Reputation: 1784
My server program uses the trust store for client certs which works fine for the two way handshake, however I would like to be able to get the certs from the trust store for other things. I noticed this example for Key stores. How do I do about it for trust stores?
I setup the trust store in following way for my SSL two way handshake, but I want to use the certs for something else.
System.setProperty("javax.net.ssl.trustStore", "store.jts");
System.setProperty("javax.net.ssl.trustStorePassword", "PASS);
Upvotes: 0
Views: 1709
Reputation: 30088
Both trust stores and key store are KeyStore objects. Just the usage is different. So, the example that you found should work for either a key store or a trust store, since they are objects of the same type.
Upvotes: 2