Ask a Question

Solution ID : SO21731

Last Modified : 05/02/2018

How to restore a private key in IIS 7.0 or IIS 8.0

Solution

The following instructions apply to Windows Server 2008 (IIS 7.0) & Windows Server 2012 (IIS 8.0). Perform the following steps to restore the private key.


Import SSL certificate into the Personal > Certificates folder

  1. Create a Certificates snap-in in a MMC console, refer to solution SO9999.
  2. From the top left-hand pane, expand the Certificates tree, expand the Personal folder
  3. Right-click the Certificates sub folder and select All Tasks > Import
  4. The Certificate Import Wizard opens. Click Next
  5. Click Browse and then navigate to the SSL certificate file.
  6. Click Open > Next
  7. Ensure "Place all certificates in the following store" is selected, ensure that "Personal" is listed for the certificate store.
  8. Click Next > Finish
     

Import the Intermediate Certificate into the Intermediate Certification Authorities > Certificates folder

Download the correct Intermediate CA certificate, refer to article INFO1421.

  1. From the left pane, expand the Intermediate Certification Authorities folder
  2. Right-click on the Certificates sub folder
  3. Select All Tasks > Import - A Certificate Import Wizard will open.
  4. Click Next
  5. Click Browse and then navigate to the Intermediate CA Certificate file
  6. Click Next
  7. Select Place all certificates in the following store: Intermediate Certification Authorities
  8. Click Next
  9. Click Finish 
     

Restore Private Key

  1. With the MMC console still open, select the Certificates folder inside the Personal folder in the left-hand pane.
  2. Double-click the newly imported SSL certificate in the right-hand pane, then select the Details tab.
  3. Scroll down and select the Thumbprint field, then select and copy the entire thumbprint (in the bottom box) to the clipboard.
  4. Open a command prompt, then enter the following command:
     
    certutil -repairstore my "<thumbprint>"

    Example:
     
    certutil -repairstore my "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f"

    If successful, the response will be "CertUtil: -repairstore command completed successfully"

 
Assign SSL certificate in IIS

  1. Go to > Start > Administrative Tools > Internet Information Services (IIS) Manager.
  2. From the Connections pane on the left, expand the local server, expand the Sites folder and select the web site to be secured with SSL.
  3. From the Actions pane on the right, select the Bindings option under Edit Site.
  4. In the Site Bindings window, select an existing https binding and click Edit. If there are no existing https bindings, click Add.
  5. Ensure the type is set to 'https', then select the new SSL certificate from the drop down menu.
  6. Click the View button to confirm details of the certificate.
  7. Click OK > Close

NOTE: If unable to complete the steps listed above, the certificate will need to be replaced. Create a new Certificate Signing Request (CSR) on the server by following the instructions in the knowledge base solution SO18080. Once the new CSR has been created, replace the SSL certificate, refer to solution SO21129