Extract certificates from .pfx file
The *.pfx file is in PKCS#12 format and includes both the certificate and the private key.
export the private key: openssl pkcs12 -in certname.pfx -nocerts -out key.pem -nodes
export the certificate: openssl pkcs12 -in certname.pfx -nokeys -out cert.pem
remove the passphrase from the private key: openssl rsa -in key.pem -out server.key