Hi,
I'm working on a
Tomcat installation that accesses various web services. I added an interface into a new web service using axis.
the code I used to add certification for that web service was like so:
System.setProperty("javax.net.ssl.trustStore",CERTIFICATE_STORE_FILENAME);
which works, but it stops all the other web services from authenticating.
However, all the other web services dont use the trustStore.
they generally do something like this:
KeyStore ks = KeyStore.getInstance("PKCS12", "SunJSSE");
ks.load(new FileInputStream(cert_name), cert_password.toCharArray());
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
kmf.init(ks, cert_password.toCharArray());
SSLContext sslc = SSLContext.getInstance("SSLv3");
sslc.init(kmf.getKeyManagers(), null, null);
SSLSocketFactory ssf = sslc.getSocketFactory();
which use the keystore. I was under the impression that the trustStore and the keyStore were seperate, and wouldn't interfere with each other.
How can I resolve this?
John