Ask a Question

Advanced Search

Solution ID : SO17201

Last Modified : 05/02/2018

How to convert a JKS (.jks) Keystore to the PKCS#12 (.p12) format

Problem

How to convert a JKS keystore file to PKCS#12 format.
How to move a certificate from Tomcat to IIS

Solution

To convert a JKS (.jks) keystore to a PKCS#12 (.p12) run the following command:

Note: This command is supported on JDK / JRE keytool versions 1.6 and greater. Keytool is a third party tool which is not supported by Symantec

keytool -importkeystore -srckeystore [MY_KEYSTORE.jks] -destkeystore [MY_FILE.p12] -srcstoretype JKS -deststoretype PKCS12 -deststorepass [PASSWORD_PKCS12]


List of example parameters:

MY_KEYSTORE.jks: path to the keystore that you want to convert.
MY_FILE.p12: path to the PKCS#12 file (.p12 or .pfx extension) that will be created.
PASSWORD_PKCS12: password that will be requested at the PKCS#12 file opening.

 

To verify the contents of the .p12 file (e.g. MY_FILE.p12), run the following command:

keytool -list -v -keystore [MY_FILE.p12] -storetype PKCS12


For more information on Keytool click here.