You are on page 1of 3

Default Keystore

Installing Certificate to the Default Keystore (JDK cacerts)


1. Export the certificate from the server (.cer)
2. Open command prompt and go to JAVA_HOME/jre/lib/security
3. Execute the following command
Windows
keytool -import -v -alias <alias-name> -keystore cacerts -file <filepath>\<cert-name>.cer
Password: changeit
Unix
<JAVA_HOME>/bin/keytool -import -v -alias <alias-name> -keystore
cacerts -file <file-path>\<cert-name>.cer
Password: changeit
4. Select option yes and press enter
To view the certificate in the Default Keystore (JDK cacerts)
1. Open command prompt and go to JAVA_HOME/jre/lib/security
2. Execute the following command
Windows
keytool -V -list -keystore cacerts
Password: changeit
Unix
<JAVA_HOME>/bin/keytool -V -list -keystore cacerts
Password: changeit
To delete the certificate in the Default Keystore (JDK cacerts)
1. Open command prompt and go to JAVA_HOME/jre/lib/security
2. Execute the following command
Windows
keytool -V -delete -alias <alias-name> -keystore cacerts
Password: changeit
Unix
<JAVA_HOME>/bin/keytool -V -delete -alias <alias-name> -keystore
cacerts
Password: changeit

Custom Keystore
Installing Certificate to the Custom Keystore

1. Export the certificate from the server (.cer)


2. Open command prompt and go the location where you want to create your
custom keystore
3. Execute the following command
Windows
keytool -import -v -trustcacerts -alias <alias-name> -file <filepath>\<cert-name>.cer -keystore <keystore-name>.jks -keypass
changeit
Password: changeit
Unix
<JAVA_HOME>/bin/ keytool -import -v -trustcacerts -alias <alias-name>
-file <file-path>\<cert-name>.cer -keystore <keystore-name>.jks
-keypass changeit
Password: changeit
4. Select option yes and press enter
To view the certificate in the Custom Keystore
1. Open command prompt and go the location where your keystore is located.
2. Execute the following command
Windows
keytool -V -list -keystore <keystore-name>.jks
Password: changeit
Unix
<JAVA_HOME>/bin/keytool -V -list -keystore <keystore-name>.jks
Password: changeit
To delete the certificate in the Custom Keystore
1. Open command prompt and go the location where your keystore is located.
2. Execute the following command
Windows
keytool -V -delete -alias <alias-name> -keystore <keystorename>.jks
Password: changeit
Unix
<JAVA_HOME>/bin/keytool -V -delete -alias <alias-name> -keystore
<keystore-name>.jks
Password: changeit
Add the following System variables when invoking Custom Keystore
-Dweblogic.security.SSL.ignoreHostnameVerification=true
-Dweblogic.security.TrustKeyStore=CustomTrust

-Dweblogic.security.CustomTrustKeyStoreFileName=<location>/<keystorename>.jks -Djavax.net.ssl.trustStore=<location>/<keystore-name>.jks
-Djavax.net.ssl.trustStorePassword=changeit

You might also like