Heavily inspired by http://stackoverflow.com/questions/9497719/extract-public-private-key-from-pkcs12-file-for-later-use-in-ssh-pk-authentifica
By using -nodes we avoid using a password
- extract the private key
openssl pkcs12 -in file.pfx -nocerts -out file.pem -nodes
- extract the certificate file
openssl pkcs12 -in file.pfx -clcerts -nokeys -out file.cert