Export private key from PFX files

Below I detail how to export the private key from a PFX file, this is for needed for instance in Ability Mail Server to allow SSL to work.

  1. Export the private key file from the pfx file
  2. Remove the passphrase from the private key
  3. Export the certificate file from the pfx file

openssl pkcs12 -in filename.pfx -nocerts -out key.pem
openssl pkcs12 -in filename.pfx -chain -nokeys -out cert.pem
openssl rsa -in key.pem -out server.key

I use OpenSSL for Windows for this

Leave a Reply

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