====== SSL Certificate / Export your private key ====== ===== Follow the steps below to export your Certificate and Private Key. ===== - Start the Microsoft Management Console > Run mmc.exe {{ :linux:01.png?nolink |}} - Click the 'Console' menu and then click 'Add/Remove Snap-in'. {{ :linux:02.png?nolink |}} - Click the 'Add' button and then choose the 'certificates' snap-in and click on 'Add'.{{ :linux:03.png?nolink |}} - Select 'Certificates' and click 'Add'. {{ :linux:04.png?nolink |}} - Select 'Computer Account' then click 'Next'.{{ :linux:05.png?nolink |}} - Select 'Local Computer' and then click 'OK'. {{ :linux:06.png?nolink |}} - Click 'Close' and then click 'OK'.{{ :linux:07.png?nolink |}} - Expand the menu for 'Certificates' and click on the 'Personal' folder.{{ :linux:09.png?nolink |}} - Right click on the certificate that you want to export and select 'All tasks' > 'Export'.{{ :linux:10.png?nolink |}} - A wizard will appear. Make sure you check the box to include the private key and continue through with this wizard until you have a .PFX file. ===== Next run OpenSSL to extract the private key, and the cert file ===== Export the private key file from the pfx file openssl pkcs12 -in filename.pfx -nocerts -out key.pem Export the certificate file from the pfx file openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem Remove the passphrase from the private key openssl rsa -in key.pem -out server.key Secure your private key chmod 400 server.key