SSL Java app error: unable to find valid certification path to requested target

360 views
Skip to first unread message

PASAf

unread,
Jan 31, 2017, 11:49:51 PM1/31/17
to OWASP ZAP User Group
Please help me as I don't know where else I could ask it.

Debugging app with bundled custom JVM where I can not modify any system properties (but can define proxy via command line).
Followed instructions in https://github.com/zaproxy/zaproxy/wiki/FAQjavaappssl
(in bundled JVM there is cacerts)

App raised exception:

javax.net.ssl.SSLHandshakeException: 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.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun
.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1904)
    at sun
.security.ssl.Handshaker.fatalSE(Handshaker.java:279)
    at sun
.security.ssl.Handshaker.fatalSE(Handshaker.java:273)
    at sun
.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1446)
    at sun
.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:209)
    at sun
.security.ssl.Handshaker.processLoop(Handshaker.java:913)
    at sun
.security.ssl.Handshaker.process_record(Handshaker.java:849)
    at sun
.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1023)
    at sun
.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
    at sun
.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
    at sun
.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
    at sun
.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    at sun
.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun
.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
    at tzax
.m.run(SourceFile:840)
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:385)
    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:326)
    at sun
.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)
    at sun
.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
    at sun
.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1428)
   
... 11 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun
.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:196)
    at java
.security.cert.CertPathBuilder.build(CertPathBuilder.java:268)
    at sun
.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
   
... 17 more

Same exception I get with Fiddler and Charles. Additionally Charles gives me: SSLHandshake: Received fatal alert: certificate_unknown

Connection protocol is TLSv1.2

What am I doing wrong?

Reply all
Reply to author
Forward
0 new messages