Forum Stats

  • 3,826,669 Users
  • 2,260,688 Discussions
  • 7,897,046 Comments

Discussions

How to dynamically load trustStore and keyStore path?

Hi,

I am reading jks properties like trustStore and keyStore path from a file.

When I start my application I can see that the default values are read, at least for trustStore:

keyStore type is : jks

keyStore provider is :

init keystore

init keymanager of type SunX509

trustStore is: /my/java/install/path/SLED11-x86_64/jdk/1.7.0_80/jre/lib/security/cacerts

trustStore type is : jks

trustStore provider is :

Then later on I set the propety values:

System.setProperty("javax.net.ssl.keyStore", keyStorePath.toString());

But it seems that they are not set at runtime.

How can I set these properties at runtime ( not using minus D parameters).

br,

//mike

This discussion has been closed.