Registering a certificate in the certificate store

By eidias on (tags: certificate, categories: infrastructure)

This is another bit that will be helpful with our next tfs build script modification.

To use a certificate for either strong naming or signing code, you need to place it in the certificate store of the user asking for it (e.g. if you’re executing an automated build, the user in whose context the build is executed)

To place the certificate in the store follow these steps:

  1. win+r and type in “mmc” – this will open the management console
    image
  2. Press ctrl+m or select File –> “Add/Remove snap-in”
    and select “Certificates” from the left panel
    image
    Then click “Add”
  3. Select “My user account”
    image
    and click “Finish”
  4. The snap-in is selected. Press “OK”
    image
  5. Expand the tree on the left and right click on “Personal” node. Then select “All tasks” –> “Import…”
    image
    A wizard will appear
  6. Select “Next” and then specify the certificate file you want to import and click “Next”
    image
  7. Provide a password (if your certificate has one) – leave the “Enable strong private key protection…” option unchecked, and select the “Mark key as exportable…” (this may come in handy at some point). Check the “Include all extended properties” and press “Next”
    image
  8. Select “Automatically select the certificate store based on the type of certificate” and press “Next”
    image
  9. Press finish in the next screen and you’re done
    image

The certificate is now in your certificate store and can be used where needed.

Cheers