SSLEngine - General SSLEngine problem
843811Sep 9 2009 — edited Sep 10 2009I have an issue related to SSLEngine, but I don't believe it to be an SSLEngine problem. It is likely a problem with my keystore/truststore. I'm working with Java 5 on Windows.
Caused by: sun.security.validator.ValidatorException: No trusted certificate found
at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:304)
at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:107)
at sun.security.validator.Validator.validate(Validator.java:203)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:841)
... 6 more
I'm assuming this means I set up my certificate incorrectly even though the SSLEngine initialized just fine with it. The handshake gets through the Client Hello and Server Hello/Cert, but when the client attempts to wrap() the credentials, the above exception is thrown.
So on to what I think the real problem is...I have some PEM files that I was provided that I'm trying to use in Java keystore file(s). I am able to successfully convert the client PEM file to a keystore. However, I'm having trouble importing the certificate's (or its CA's) PEM to a truststore. I've Googled this and have tried several things, notably the following:
http://roopindersingh.com/2008/12/03/converting-pem-certificates-and-private-keys-to-jks/
Everything works except for the last command, where I get the following error no matter what I try:
keytool error: java.security.SignatureException: Signature does not match.
I apologize for my ignorance here, but I'm not sure what the keytool is trying to match the signature with. Any help would be appreciated in getting around/past this issue.
Thanks,
Ken