Truststore on the fly

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Truststore on the fly

MillieretXavier
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
Reply | Threaded
Open this post in threaded view
|

Re: Truststore on the fly

MillieretXavier
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
Reply | Threaded
Open this post in threaded view
|

Re: Truststore on the fly

MillieretXavier
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