posted on: 2016-03-27 15:04:46
I couldn't download my website using the java url connection using https. I had to add my certificate provider as a trusted provider.
For starters, I got the following error:
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
Then I added this to a VM argument to see more verbose output.
-Djavax.net.debug=SSL
Then I had to download the certificate from StartSSL
Then I ran this commmand:
keytool -importcert -keystore ./path/to/jdk/jre/lib/security/cacerts -trustcacerts -alias "StartCom Class 1 DV Server CA" -file ./path/to/cert-name-ca.crt
This StackOverflow answer helped me the most. Except they left off the default password bit, which turns out to be changeit (I think it is a suggestion to change it!?) This was found using this answer by following the link to here: magicmonster: PKIX path building failed
Comments
create comment?