Video Screencast Help

Support for .pem RA certificate

Created: 24 Aug 2011 • Updated: 03 Jan 2012 | 1 comment
This issue has been solved. See solution.

 

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 1 CommentJump to latest comment