Convert a PFX file to PEM with certificate and key
convert pfx to pem openssl | extract crt and key from p12 | use windows certificate on linux | unpack pfx file | openssl | pkcs12 | pem | convertCaution: This command changes the system. Understand what it does before you run it.
openssl pkcs12 -in example.com.pfx -out example.com.pem -nodesAsks for the import password and writes all included certificates and the private key into a PEM file, as expected by Apache, nginx or Plesk. With -nodes the key is stored unencrypted, so protect the file right away with chmod 600. Certificate and key can then be split into separate files with a text editor.
Note: With older PFX files, OpenSSL 3 may report unsupported algorithm, in that case add -legacy.
Also searched as
- convert pfx to pem openssl
- extract crt and key from p12
- use windows certificate on linux
- unpack pfx file