How to extract parse certificates and private keys from PKCS #12 files using OpenSSL
2 years ago
Originally Published: 2009-12-08
Article Number
000065913
Applies To
RSA Product Set: All
Tasks
This article provides information on how to extract parse certificates and private keys from PKCS #12 files using OpenSSL.
Resolution
Run the command:
openssl pkcs12 -in file.p12 -out file.pem

From the OpenSSL PKCS#12 Program Usage page:

This will dump all the keys and certificates in the PKCS#12 file to a file named file.pem. It will ask you for the password to decrypt the PKCS#12 file and the pass phrase to encrypt the output private key with.