SSL Certificate : Extract .key and .crt from .pfx

From KlavoWiki
Jump to navigationJump to search

Certificate and Private Key

openssl pkcs12 -in [yourfilename.pfx]          -nocerts -out         [keyfilename-encrypted.key]
openssl rsa -in    [keyfilename-encrypted.key] -out                  [keyfilename-decrypted.key]
openssl pkcs12 -in [yourfilename.pfx]          -clcerts -nokeys -out [certificatename.crt]

Privacy Enhanced Mail (PEM)

openssl pkcs12 -in [yourfilename.pfx]          -out                   [yourfilename.pem] -nodes