“unable to find valid certification path to requested target”, but browser says it’s OK [duplicate]

The different certificates can be found in the following keystore :

%JAVA_HOME%/jre/lib/security/cacerts

If you want to list the trusted certificates :

keytool -list -keystore %JAVA_HOME%/jre/lib/security/cacerts

The password is optional to list.

If you want to add an entry :

First, export the certificate to import, let’s say it will be c:\cert.crt. The best way to do it is using firefox, right-click on the lock picture in the URL, and after a few clicks, you have an export feature.

Then type :

keytool -import -alias my-cert -file c:\cert.crt -keystore %JAVA_HOME%/jre/lib/security/cacerts

The default password is: changeit

The alias is a user-defined label, choose it wisely, to remember if you need it one day, what it was.

With all this, you should be able to trust the certificate and have everything working again.

Leave a Comment

tech