Can i flush the keystore cache at runtime without restarting the jdk?

I have an application running on jdk. At startup, it reads the keystores and caches their contents.

I now added a CA to my jdk/jre/lib/security/cacerts but the jdk is still not seeing it, because it is keeping the cached info.

How can i flush that cache and request the jvm to re-read the keystore contents?

thanks
ixarissysadminAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ixarissysadminConnect With a Mentor Author Commented:
i will implement that and tell you how it goes.

thanks
0
 
schybertConnect With a Mentor Commented:
I'm guessing you are not using a KeyStore object explicitly in your code and what you want is for an outgoing SSL connection to use your updated cacerts file for validating server certificates? In that case I'm pretty sure you can just set the javax.net.ssl.trustStore system property and the keystore would be refreshed...

System.setProperty("javax.net.ssl.trustStore", "path to cacerts");
0
All Courses

From novice to tech pro — start learning today.