Tuesday, April 10, 2018

How to extract private key from an SSL cert

First Import the cert into IIS. Then, export it out as a .pfx file. Make sure to export the private key as well.

Using OpenSSL ren the following command to extract the private key:

openssl pkcs12 -in certname.domain.com.pfx -nocerts -out priv_key.pem