Converting a PFX certificate into a PEM for an application?

0
Hi all I’ve been given a PFX file for a certificate our business owns, and need to convert it to a PEM with an RSA key so that it can be uploaded to our mendix app. I’m not used to using OpenSSL so am getting pretty stuck on handling the file. I seem to be able to convert it to a .PEM file – but the key in that file is -----BEGIN ENCRYPTED PRIVATE KEY-----, while I need -----BEGIN RSA PRIVATE KEY----- Does anyone have any experience doing this, and could suggest what I can do to convert this? Cheers, Luke
asked
1 answers
2

You will need something like the following…
 

openssl pkcs12 -in x.pfx  -nocerts -nodes -passin pass:123456 | openssl rsa -out privkey.pem

 

Replacing x.pfx with the name of your pfx file, 123456 with your certificate’s password, and privkey.pem with the name you want for your output file. You can then open the privkey.pem (or whatever you called it) and that will have your private key.

answered