The default location of the keystore file is:
$JAVA_HOME/jre/lib/cacerts
where cacerts is the name of the trusted keystore file. The default password (if you haven’t changed it), should be changeit.
If we want to add a certificate to the keystore, we should use the command keytool (which comes with the JRE)
keytool -import -file [filename] -alias [alias we want to give to the certificate] -keystore [path to the keystore file]
How to list all the certificates in a specific file:
keytool -list -keystore [path to the keystore file] -alias [alias, if we know it]
How to delete a certificate:
keytool -delete -alias [alias of the certificate to delete] -keystore [path to the keystore file]
more to come…