user2648519
user2648519

Reputation: 117

Opening secure client website in webview throwing security Validation exception

There is client certificate requires to access client secure website,So, if I access this secure website by uploading certificate in system browser. I can able to access the secure website.

But accessing same website in webview of JavaFX application, by passing client certificate programmatically, is throwing, below error:

    javax.net.ssl|DEBUG|A1|JavaFX Application Thread|2024-05-31 17:09:41.320 IST|SSLCipher.java:466|jdk.tls.keyLimits:  entry = AES/GCM/NoPadding KeyUpdate 2^37. AES/GCM/NOPADDING:KEYUPDATE = 137438953472
javax.net.ssl|DEBUG|A1|JavaFX Application Thread|2024-05-31 17:09:41.321 IST|SSLCipher.java:466|jdk.tls.keyLimits:  entry =  ChaCha20-Poly1305 KeyUpdate 2^37. CHACHA20-POLY1305:KEYUPDATE = 137438953472
javax.net.ssl|DEBUG|30|Finalizer|2024-05-31 17:09:41.406 IST|SSLSocketImpl.java:577|duplex close of SSLSocket
javax.net.ssl|DEBUG|30|Finalizer|2024-05-31 17:09:41.406 IST|SSLSocketImpl.java:1781|close the SSL connection (passive)
javax.net.ssl|ERROR|62|HttpClient-1-Worker-0|2024-05-31 17:09:41.501 IST|TransportContext.java:370|Fatal (CERTIFICATE_UNKNOWN): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (
"throwable" : {
  sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:439)
    at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306)
    at java.base/sun.security.validator.Validator.validate(Validator.java:264)
    at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:285)
    at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:144)
    at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:632)
    at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:473)t

Even I tried adding certificate in system keystore also. Need help in resolving this issue

I am using Java-17 and JavaFx-17

Upvotes: 0

Views: 60

Answers (0)

Related Questions