A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
PostGIS in Action
this week in the
JDBC and Relational Databases
Java Advanced Topics Training
Java in General
How to chagne truststore property at runtime and let the changed to affect
Joined: Jul 03, 2010
May 08, 2012 23:51:01
i am trying to change truststore property dynamically. the changes could not be affected at run time until i restart the application.
System.setProperty("javax.net.ssl.trustStore", "path1"); . . // code execution . . System.setProperty("javax.net.ssl.trustStore", "path1"); . . //code execution . .
is there any way to change truststore and let the changes should affect ?
Joined: Sep 23, 2014
Sep 23, 2014 22:06:57
When you change the javax.net.ssl.trustStore file, please add below code before you send https request:
sslContext = SSLContext.getInstance("SSL");
sslContext.init(null, null, null);
I try it with jdk7 and the result is ok
It is sorta covered in the
JavaRanch Style Guide
subject: How to chagne truststore property at runtime and let the changed to affect
How to implement certificate/security into web service client
unknown certificate error.
"javax.net.ssl.keyStore" system property inside a jar package
Totally lost, need help!
Basic auth + ssl on client side
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015