I have a java program trying to connect to a secure url using a self-signed certificate generated by the server. The .pfx file has been installed and am able to access the site using the IE browser. The certificate file has been imported into the keystore file using the keytool command and has also been referenced in the java program using the "javax.net.ssl.trustStore" system property. But for some reason, the client program is not able to connect to the secure url even though I am able to connect using the browser after the certificate is accepted. Please let me know any thoughts.
Can you let us know what error are you getting and post stack trace here?
posted 15 years ago
I was able to get around this issue by referencing the .pfx file in the java program using the Keystore apis. The .cer file did not work because it does not contain the private key. So importing the .cer file wasn't enough.
My favorite is a chocolate cupcake with white frosting and tiny ad sprinkles.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop