Adding a certificate to the Java SSL keystore
The Java SSL keystore file is typically located at:
$(JAVA_HOME)/jre/lib/security/cacerts
This file contains the certificates of CAs that you want to trust. To add a certificate to this file, use the keytool program that comes with the JRE.
$(JAVA_HOME)/jre/bin/keytool -import -alias "mykey" -file certificate.cer -keystore $(JAVA_HOME)/jre/lib/security/cacerts
When prompted for a password, enter the default password:
changeit