I have generated a keystore file from a remote server using the following command ::
openssl s_client -showcerts -connect esesslx0833.se:9443 > /tmp/test.cer
keytool -importcert -file /tmp/test.cer -keystore qpid.jks -alias "Alias1"
Now that I have generated this file successully, I want to test it by initiating a SSL connection to the remote node to make sure my qpid.jks
file works.
Is there a way I can test using a standard Linux command ? Because when I use the jks file in my application, I get the ERROR ::
Caused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)[:1.8.0_121]
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)[:1.8.0_121]
at sun.security.validator.Validator.validate(Validator.java:260)[:1.8.0_121]
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)[:1.8.0_121]
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:281)[:1.8.0_121]
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:136)[:1.8.0_121]
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1501)[:1.8.0_121]
... 21 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
System.setProperty
".