I have a webapp that is calling a web service supplied by a vendor. The vendor requires the use of client certificates for authentication, and I have successfully called their service using the PKCS#12 keystore they gave us with JAX-WS 2.2 using code like this:
System.setProperty("javax.net.ssl.keyStore", "myKeyStore.p12");<br /> System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");<br /> System.setProperty("javax.net.ssl.keyStorePassword", "password");
So it seems to me that I will need to include all four of my certs in the same keystore, but as they are supplied by the vendor, each cert/key pair comes in a separate .p12 file. Is it possible to combine all four p12 files into a single keystore using keytool?
Once I resolve that, how do I tell JAX-WS which certificate to present each time it contacts the vendor's web service?
Any insights would be very much appreciated.