Exporting SSL certificates from Windows to Linux

Exporting SSL certificates from Windows to Linux

Last Updated: 1/14/2015

Step one: PFX Export on Windows Server

You'll need to get the certificate and key out of Windows into a pfx (PKCS #12) format.

  1. Click Start, Run, then type "mmc" and hit enter.
  2. In the left menu, choose "Add/Remove Snap In".
  3. Click "Add", then click "Certificates", then click OK.
  4. When the wizard starts, select "Computer Account", "Local Computer" and finish the wizard. (Be sure to remember the password you set as we'll use it later)
  5. Once the wizard has completed, go back to the MMC and expand the "Certificates" node, then the "Personal" node.
  6. Click on the "Certificates" node under "Personal" and find your certificate in the right panel.
  7. Right-click on the certificate and choose "All Tasks", then "Export".
  8. When the wizard starts, select "Yes" for exporting the private key, then select ONLY "Strong Private Key Protection" from the PFX section.  You will also need to set the password and specify a location to save the PFX file.
  9. After the PFX file has been saved, close out of the MMC.
  10. Upload the PFX file to a linux server with openssl.
Step 2: Breaking up the PFX file into .key and .crt
  1. You'll want to decrypt the PFX file into a plantext PEM file.  (NOTE: PFX files are binary files and can't be viewed in a text editor) Type:
    openssl pkcs12 -n file.pfx -out file.pem
  2. You'll be asked for the password for the PFX (which is the one you set in the Windows Wizard).  Once you enter the password, you will be asked for a new password.  You'll want to remember this password for later.
  3. Open up the PEM file in a text editor and copy the private key and certificate key to different files (i.e. file.key and file.crt)
  4. openssl rsa -n file.key -out file.key
  5. openssl rsa -n file.crt -out file.crt
  6. That's it.  You now have the .key and .crt file to use on a Linux / Unix server.
  • 10 Users Found This Useful
Was this answer helpful?

Related Articles

Issue SSL certificate

SSL/TLS (Secure Sockets Layer) (Transport Layer Security) is the standard technology for...