Convert PEM to PFX Certificate

Convert PEM to PFX Certificate

Sometimes, you have a certificate in PEM format as a CRT file (also called a CER file) with a key file (also called a PEM file), and you need to combine and convert them into a PFX certificate.

In this post, I will show you step-by-step how to convert a PEM certificate into a PFX file.

Prerequisites

The Process

I will be using C:\SSL as my working directory.

I will be using Microsoft Windows with Windows Terminal and PowerShell.

To convert the certificate using OpenSSL, we will need to use a few options to create our command.

In my example, I have a private key named private.key, and my certificate file is named star_thedxt_ca.crt. I also want to create a PFX file named wild_thedxt_ca.pfx. The command for me will look like openssl pkcs12 -inkey private.key -in star_thedxt_ca.crt -export -out wild_thedxt_ca.pfx

That’s it. You have now combined and converted the private key and the PEM certificate into a PFX certificate.

Exit mobile version