Converting a PFX keystore file to JKS using Java keytool
search cancel

Converting a PFX keystore file to JKS using Java keytool

book

Article ID: 94145

calendar_today

Updated On:

Products

CA Application Test CA Continuous Application Insight (PathFinder) Service Virtualization

Issue/Introduction

This document shows how a PFX keystore (Personal Information Exchange Format also known as PKCS #12) can be converted to a Java Keystore (JKS) using the Java keytool.

How to Convert a PFX keystore file to JKS using Java keytool?

Environment

All supported DevTest releases.

Cause

N/A

Resolution

Open a command prompt and go to the directory where keytool is available.
If you have DevTest installed, you will find keytool under the $DEVTEST_HOME/jre/bin folder.
If DevTest is not installed, you will find keytool under your $JAVA_HOME/bin folder.


Using Keytool run the following command below:
keytool -importkeystore -srckeystore mypfxfile.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS
 

Replace the mypfxfile.pfx with the name of the PFX file you want to convert to a Java keystore (JKS).
Replace the clientcert . jks with the name of the keystore file you wish to create (it needs to be a JKS file).

Additional Information

For more information about keytool, please use the link below:
keytool - https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html

For more information regarding SSL, Java and DevTest, refer to KB SSL, Java and DevTest