OpenSSL :: convert P12/PFX to .PEM / .KEY

OpenSSL :: convert P12/PFX to .PEM / .KEY

covert to PEM (Both Private en Publickey)

openssl pkcs12 -in sourcefile.p12/pfx -out convertedcertname.pem -nodes

Run the following command to export the private key

openssl pkcs12 -in sourcefile.p12/pfx -nocerts -out privatekey.pem -nodes

Run the following command to export the certificate

openssl pkcs12 -in sourcefile.p12/pfx -nokeys -out publiccert.pem


Optionally you can use this command to remove the password from KEY FILE

openssl rsa -in privatekey.pem -out privatekey_nopassword.pem/key