You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by MillieretXavier <xa...@eaton.com> on 2017/11/23 08:55:14 UTC

Truststore on the fly

Hi all,

ActiveMq 5.12.3
Karaf 3.0.7
A question about truststore in activeMq.
In my application I add some certificate (amqp client) on the fly inside
activemq truststore.
I saw activemq take into account certificates from trusstore at the startup,
but not refresh, I must restart karaf (or the service). Is there a way to do
that?

Reagards



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Truststore on the fly

Posted by MillieretXavier <xa...@eaton.com>.
Hi all,

I found an resolve my problem, so I shared the solution!

The goal is load again the server when we add a private key inside the
keystore.
I used the OSGI mechanism on the update configuration file.
This event stop the server and start again with new config file and so new
all keys inside the keystore.
Here the code to do that:

@Requires // Ipojo dependency injection
private ConfigRepository configRepository;

Configuration[] configs =
configRepository.getConfigAdmin().listConfigurations("org.apache.activemq.server");
if (configs != null && configs.length > 0) {
  // Force to update.
  configs[0].update();
}

Regards



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Truststore on the fly

Posted by MillieretXavier <xa...@eaton.com>.
I did a mistake on my question, it's not the trusstore  but my keystore with
my certificate chain



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html