How Can We Help?

How do I convert a Java keystore to a PFX or P12?

You are here:

How do I convert a Java keystore to a PFX or P12?

This article explains how to convert a Java keystore file to a PKCS12 file with a .pfx or .p12 extension.

Requirements - A Java keystore that contains the root, intermediate, and your domain / end entity certificate imported using these instructions.

To convert the Java Keystore file to a PFX or P12 file, you need to run the following Java Keytool command:

keytool -v -importkeystore -srckeystore  yourkeystore.keystore -srcalias mykey -destkeystore myp12file.p12 -deststoretype PKCS12

Replace yourkeystore.keystore with the name of your actual java keystore file, and myp12file.p12 file with the name of the .p12 or .pfx file which you would like the command to generate.

Enter destination keystore password: (enter in a password for the  new .pfx/.p12 file)

This command generates your PFX / P12 file (combination of certificate, private key and certificate chain) that can be used to import the certificate to another server or appliance that accepts PKCS12 files.

Previous How do I export my certificate from cPanel?
Next Certificate installation: Microsoft IIS 7.x
Table of Contents