Import self signed certificate to a trusted root store in Java

Java

Figured it out with this helpful article:

https://www.ibm.com/docs/en/opw/8.0.0?topic=environments-importing-ca-certificate-java-runtime-environment-openpages

Open command line, then goto the java security folder:

cd c:\Program Files\Java\jre1.8.0_291\lib\security

Run:

..\..\bin\keytool.exe -import -alias localhost -trustcacerts -file c:\certs\localhost.cer -keystore cacerts

The default password for the cacerts keystore is "changeit"


Post a Comment

Previous Post Next Post