How do I convert a .PFX certificate to .PEM?

Posted on

Question :

I exported a .pfx file from my A3 certificate. How do I convert it to .pem . In VB.Net if possible.


Answer :

The easiest way I think is with the OpenSSL binary, usually for linux, but it also has a Windows version:

The installer can be found here: link (direct link: link ), or in some software library such as ‘cygwin’, for example if you are familiar with it.

The command for conversion is:

openssl pkcs12 -in c:caminhodocertificadodeorigem.pfx -out c:caminhodoarquivodedestino.pem -nodes

When you enter this command, you will be prompted for the password used to protect the original .pfx file so that it is decrypted. This command will generate a UNPROTECTED (no password) certificate, which is suitable for use in automated applications (eg web servers).



Leave a Reply

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