πŸ“‹ OpenSSL: Converting certificate formats (.cer, .crt, .pem) to .pfx

This article shows administrators how to use the command-line tool OpenSSL to convert various SSL certificate formats into the required .pfx file and how to include intermediate certificates.

πŸ“‹ OpenSSL: Converting certificate formats (.cer, .crt, .pem) to .pfx

If your SSL certificate is in a format such as .cer, .crt, or .pem and you possess the corresponding private key (usually a .key file), you can use OpenSSL to convert these into the required .pfx format.

OpenSSL is a command-line tool available on many servers.

Converting the certificate

Use the following command in the command line (terminal or command prompt):

openssl pkcs12 -export -out YourCertificate.pfx -inkey YourPrivateKey.key -in YourCertificate.cer

 

Replacing placeholders

Replace the placeholders in the command above with your actual file names:

  • YourCertificate.pfx: The desired name for the new .pfx file.
  • YourPrivateKey.key: The file name of your private key.
  • YourCertificate.cer: The file name of your certificate (can also be a .crt or .pem file).

Including intermediate certificates

If you also need to include intermediate certificates (these are often provided by the CA as a separate file, e.g., IntermediateCertificates.pem), extend the command as follows:

openssl pkcs12 -export -out YourCertificate.pfx -inkey YourPrivateKey.key -in YourCertificate.cer -certfile IntermediateCertificates.pem

 

Additionally, replace IntermediateCertificates.pem with the file name of the file containing your intermediate certificates.

Setting an export password

During the process, you will be prompted to set an export password for the .pfx file. This password will be required for later installation.

Important: The assigned password must be communicated to FTAPI Support along with the .pfx file via a secure channel (e.g., SubmitBox).

Related articles

❓ What to do in case of "Insecure connection" / expired SSL certificate?

πŸ“‹ Windows: Create .p12 / .pfx certificate from a .p7b file