Httpbin: https digest request failing with security exception


#1

Hi all;

I have some simple code that does what I think is a correct & basic request to read the url https://httpbin.org/digest-auth/auth/user/passwd

Reading that url in a browser works fine. But my Java code throws:
Exception in thread “main” 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

I have the code and full exception stack at http://stackoverflow.com/questions/43146218/https-digest-request-failing-with-security-exception (not repeated here to keep this post short).

httpbin.org uses SSL cert from Let’s Encrypt, and I am most likely hitting an issue with my JRE missing the CA certs. What do I need to do to get this set up?

Or is it something else?

Thanks – dave


#2

What version of Java do you use? You can find the compatibility of LE here: https://letsencrypt.org/docs/certificate-compatibility/


#3

That was it - thank you.


#4

Hi @DavidThi

have a review of this

I am not sure what version of java you use but you should be able to tell it to ignore certificate errors.

Longer term fix would be to install the certificate in to the java key store.

https://blogs.oracle.com/jtc/entry/installing_trusted_certificates_into_a

The server serves up the intermediate and supports JAVA 7 and 8

Andrei


#5

A even more longer term fix would be to update your Java :wink:


#6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.