Converting pem to pfx
Learn how to convert pem certificates into a pfx certificate in Windows 11.
Download and install OpenSSL for Windows from https://kb.firedaemon.com/support/solutions/articles/4000121705 or https://slproweb.com/products/Win32OpenSSL.html
Open Win64 OpenSSL Command Prompt and navigate to the folder that contains the .pem files
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.pemIf 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.pemAfter 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