How To Export SSL Certificate from IIS and Convert Your .PFX into .CRT and .KEY files

11:00 PM

These instructions were developed using IIS 6.0 on Windows 2003 Server SP1 and OpenSSL 0.9.5a.
  1. Export your SSL Certificate from IIS:
    • Open 'Internet Information Services' from 'Administrative Tools' on your Start menu.
    • Right-click on your website and select 'Properties'.
    • Choose the 'Directory Security' tab and click on 'View Certificate'.
    • Choose the 'Details' tab, and click 'Copy To File'.
      • Click 'Next' and choose 'Yes, export the private key'.
      • Make sure 'Personal Information Exchange - PKCS#12 (.PFX) is selected.
      • Clear all checkboxes and click 'Next'.
      • Enter a password of at least 4 characters and click 'Next'. (Remember this - You will need it later!)
      • Enter the path to save the file to, and click 'Next'.
      • Click 'Finish' then 'OK'.
      • Close all dialog boxes, and 'Internet Information Services'.
  2. Convert your PFX certificate to PEM
    • Download OpenSSL to the same folder you saved your certificate to. You can find it at:https://www.zoneedit.com/doc/partner/perl-utils/openssl-win32-binaries/openssl.exe
    • Start a Command Prompt and go to the folder with OpenSSL and your certificate.
    • Type 'openssl pkcs12 -in filename.pfx -out filename.pem -nodes' (without quotes).
    • Enter your password from step 1.d.iv at the prompt and press return.
    • You should see the message 'MAC verified OK'.
    • Exit the command prompt.
  3. Create the .cer and .key files
    • Create two blank documents with the extensions .cer and .key.
    • Start 'WordPad' and open the .pem file you created in step 2.
    • Open the blank .cer and .key files in "Notepad".
    • Locate the section of the file that begins with '----BEGIN RSA PRIVATE KEY----' in 'WordPad'.
    • Copy that line and everything under it up to and including '----END RSA PRIVATE KEY----'
    • Paste that text into your .key file and save it.
    • Locate the section of the file that begins with '----BEGIN CERTIFICATE----' in 'WordPad'.
    • Copy that line and everything under it up to and including '----END CERTIFICATE----'.
    • Paste that text into your .cer file and save it.
    • Close 'WordPad' and both instances of 'Notepad'.
The only files you need to keep are the .key and .cer files that you have created. Rename the .cer file to .crt. The password you will be asked for when using the SSL Utility will be the same one you entered in step 1.d.iv.

You Might Also Like

0 comments

Contact Form

Name

Email *

Message *

Translate

Wikipedia

Search results