Support for .pem RA certificate
The sample code in test drive uses a certificate of type pkcs12, .p12.
I'm using keystores, supporting multiple certificate, and the preferred format is JKS, .pem.
I'm using the following code:
System.setProperty("javax.net.ssl.keyStoreType", "JKS");
System.setProperty("javax.net.ssl.keyStore", "test_cert.pem");
System.setProperty("javax.net.ssl.keyStorePassword", "*********");
However, I'm getting an SSL Error:
java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)
Is there a different keystore type I should be using? Am I required to have my certificate in pkcs12 format?
I'm pretty sure the keystoretype JKS exists, but please correct me if I'm wrong, because I've been googling all day and my brain might be on backwards by now!
Please note also: I have tried this code with a converted .p12, pkcs12 file and it does work as expected. I'm just hoping this isn't the only format I can use. Thanks!
Comments
Please try this
I found this article on a forum which might be helpful in solving the issue you are facing
http://stackoverflow.com/questions/537040/how-to-connect-to-a-secure-website-using-ssl-in-java-with-a-pkcs12-file
Would you like to reply?
Login or Register to post your comment.