Here is the FAQ on openssl (ssl & certificate toolkit + library).
http://www.madboa.com/geek/openssl/There:
http://www.madboa.com/geek/openssl/#cert-pkcs12The pfx file is the pkcs12 certificate.
# export certificate and passphrase-less key
openssl pkcs12 -in mycert.pfx -out mycert.pem -nodes
# same as above, but youll be prompted for a passphrase for
# the private key
openssl pkcs12 -in mycert.pfx -out mycert.pem
Extract the cert & key with:
openssl rsa -in mycert.pem -out newcert.pem
The newcert .pem fiel should be splitable in an editor
as the key & crt are marked with lines like:
-----BEGIN CERTIFICATE-----
MII..................
blah blah blah
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
MII..............
blah blah blah
-----END RSA PRIVATE KEY-----