All writing
Dev-Ops17 Aug 20251 min read

Converting pem to pfx

Learn how to convert pem certificates into a pfx certificate in Windows 11.

  1. Download and install OpenSSL for Windows from https://kb.firedaemon.com/support/solutions/articles/4000121705 or https://slproweb.com/products/Win32OpenSSL.html

  2. Open Win64 OpenSSL Command Prompt and navigate to the folder that contains the .pem files

  3. Run this command to export the .pem files to .pfx

openssl pkcs12 -export -out yourdomain.pfx -inkey private.key.pem -in domain.cert.pem -certfile public.key.pem

If it didn't work, you can try this one and ignore the public key

openssl pkcs12 -export -out yourdomain.pfx -inkey private.key.pem -in domain.cert.pem

After executing the command, it asks you for an export password. Enter any password and remember it for when you need to import the certificate.

If you get an Incorrect password error during importing the, you should convert the pem to pfx via this command.

openssl pkcs12 -export -certpbe PBE-SHA1-3DES -keypbe PBE-SHA1-3DES -nomac -inkey private.key.pem -in domain.cert.pem -out yourdomain-legacy.pfx

Discussion · 00 Open

No comments on this one yet.

Leave a comment

Posting needs an account, and I approve each comment before it appears.