↑ ↓ select, Enter open, Esc close

Convert a certificate and key from PEM to PFX

Caution: This command changes the system. Understand what it does before you run it.

Adjust the values, the command updates live
user@server
openssl pkcs12 -export -out example.com.pfx -inkey example.com.key -in example.com.crt -certfile chain.pem

Creates a PKCS#12 file containing the certificate, key and chain, and asks interactively for an export password. Windows, IIS, Exchange and some Java applications expect this format. An existing target file is overwritten.

Note: OpenSSL 3 encrypts with AES by default. Older Windows versions cannot import such files, in that case add -legacy.

Also searched as

  • convert pem to pfx openssl
  • export certificate for windows iis
  • create p12 file from crt and key
  • combine crt and key into pfx

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.