How to extract .crt and .key files from .pfx file

  • Main
  • General
  • How to extract .crt and .key files from .pfx file
← All Topics

Extract the Certificate (.crt) from PFX

openssl pkcs12 -in aventislab.pfx -clcerts -nokeys -out aventislab.crt
Enter Import Password:

Extract the Private Key with Password from PFX

penssl pkcs12 -in aventislab.pfx -nocerts -out aventislab_key.pem
Enter Import Password:
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:

Decrypt the private key and store it as key file (No Password Protected)

penssl rsa -in aventislab_key.pem -out aventislab.key
Enter pass phrase for aventislab_key.pem:
writing RSA key

Convert the PFX file to an unencrypted PEM file

openssl pkcs12 -in aventislab.pfx -out aventislab.pem -nodes
Enter Import Password:


Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top