Home » Security » [solved] How to convert the certificate pfx file to the pem format with private keys using the open ssl tool

[solved] How to convert the certificate pfx file to the pem format with private keys using the open ssl tool

This quick article will walk you thru on the certificate conversion on how to convert the certificate pfx file to the pem format with private keys using the open ssl tool.  pfx version of the certificate should contain the private key. openssl tool can be downloaded  for windows or Linux using the link below

https://sourceforge.net/projects/openssl/

 

Download and extract openssl.zip to your computer . The executable file openssl.exe is located within the ‘bin’ sub folder. Copy the .PFX certificate  file to this location and run the following commands below using appropriate variables to create private and public key .PEM files. this file will then contain the private key. PFX file must include the private key

screen shot  of the openssl install path – you must go the bin folder to start using the openssl.exe application like below

openssl pkcs12 -in certificate.pfx -nocerts -out private.pem -nodes
openssl pkcs12 -in certificate.pfx -nokeys -out public.pem -nodes

The -nodes removes the password from the newly created pem file. If you want to keep the password then omit the -node from the command line and you can open the file with notepad and copy the content if needed to be pasted

Here is the result for a successful conversion “MAC verified OK”

link to more information with multiple scenarios

https://www.sslshopper.com/ssl-converter.html

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*