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.
- Export the private key file from the pfx file
- Remove the passphrase from the private key
- 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