0
votes

I am having issues sending a soap request over https using client stub. I am running ubuntu 16 and using eclipse. Ive added the certificate in /usr/lib/jvm/java-8-openjdk-amd64/jre/lib using keytool.

Any help would be gladly appreciated.

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) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) at sun.security.validator.Validator.validate(Validator.java:260) at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491) ... 41 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382) ... 47 more

1
Still having issues, I ran the application with -Djavax.net.debug=SSL enabled and the response Im getting is: main, SEND TLSv1.2 ALERT: fatal, description = certificate_unknowndelano de figueiredo

1 Answers

0
votes

Use below JVM arguments in your tomcat or application server, it should work

-Dsun.security.ssl.allowUnsafeRenegotiation=true
-Djavax.net.ssl.keyStoreType=pkcs12
-Djavax.net.ssl.keyStore=C:\client.pfx
-Djavax.net.ssl.keyStorePassword=xxxxx
-Djavax.net.ssl.keyPassword=xxxxx
-Djavax.net.ssl.trustStore=C:\keystore.jks
-Djavax.net.ssl.trustStorePassword=xxxxxx