Convert .pfx to .pem using OpenSSL

FLY:D - Cyber security image

Windows servers use .pfx files which contain the public key file (SSL certificate file) and the private key file. However, this can also be converted to .pem files to  be used on Linux server using OpenSSL.

  1. Save the .pfx file somewhere on your computer
  2. Open terminal and type the following command
    $ openssl pkcs12 -in certificate.pfx -out certificate.pem -clcerts
  3. Enter the password if prompted
  4. If successful, you should now have .pem files that can be installed on your Linux servers.

The OpenSSL documentation can be found here: https://www.openssl.org/docs/man1.1.0/man1/pkcs12.html

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.