Skip to Content

Category Archives: openssl

OpenSSL commands to extract private key and cert from pfx/p12 file

Written on February 26, 2018 at 8:55 AM, by

Export the private key file from the pfx file: #openssl pkcs12 -in filename.pfx -nocerts -out key.pem Remove the passphrase from the private key: #openssl rsa -in key.pem -out server.key Export the certificate file from the pfx file: #openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem