Loading...

Copy contents of Java Keystore to another Keystore

:heavy_exclamation_mark: This post is older than a year. Consider some information might not be accurate anymore. :heavy_exclamation_mark:

Copy all certificates from one keystore to the keystore of the current Java installation. You can use the keytool and srckeystore (source keystore) and destkeystore (destination keystore).

For Windows

cd %JAVA_HOME%
bin\keytool -importkeystore -srckeystore wildcard.keystore -srcstorepass changeit -destkeystore jre\lib\security\cacerts -deststorepass changeit

For Linux

cd $JAVA_HOME
bin/keytool -importkeystore -srckeystore wildcard.keystore -srcstorepass changeit -destkeystore jre/lib/security/cacerts -deststorepass changeit