HttpURLConnection throws SunCertPathBuilderException in jdk11
Андрей Турбанов
turbanoff at gmail.com
Mon Jun 11 23:59:08 UTC 2018
Hello.
I tried to use early jdk11 build (http://jdk.java.net/11/) - Oracle JDK
build for Windows.
I got exception when my program tries to connect (via HttpURLConnection) to
https://api.vk.com/
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:297)
~[?:?]
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
~[?:?]
at
sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
~[?:?]
at sun.security.validator.Validator.validate(Validator.java:264) ~[?:?]
at
sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:343)
~[?:?]
Same code works well with JDK 10.
Does JDK11 have different set of SSL certificates? Is there any way to
allow connection to vk.com?
Andrey Turbanov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20180612/184f8620/attachment.html>
More information about the net-dev
mailing list