Convert .pfx SSL certificate to .cer

From the command line, replacing the filename as necessary (you will need the password for the certificate, if one is assigned):

$ openssl pkcs12 -in wildcard.filename.com_2022.pfx -out wildcard.filename.com_2022.cer -nodes

If the above does not generate a certificate for you along with the private key, try adding the -legacy flag, like this:

$ openssl pkcs12 -in wildcard.filename.com_2022.pfx -out wildcard.filename.com_2022.cer -nodes -legacy

I needed to do this to convert a .pfx SSL certificate for use with Pagely.

EDIT: If you’re doing this for Pagely and the original certificate is a .pfx, after converting it you will likely need to open the .cer file in TextEdit and grab the two different parts.

One starting with -----BEGIN PRIVATE KEY----- and one starting with -----BEGIN CERTIFICATE----- and paste them in the appropriate fields after you select Add Certificate > Import Existing Private Key & Certificate options in the Pagely dashboard.

Leave a Reply

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