Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have the following need:

A windows service needs to connect to a svn repository through https. The service needs also to run as local system account for IO permissions on the machine.

Now when the service tries to connect to SVN, it throws an error saying that the certificate is not trusted (it's a self signed certificate).

I have no access to the service source code to add the svn option to trust certificate and accept it permanently. So I need to know how, in windows, add that SSL certificate to the local system account trusted certificates.

Is that possible, and if it is, what are the steps to do that?

Thanks.

share|improve this question
    
Do you have access to the .crt file? –  Dennis Dec 21 '11 at 13:20
    
I have it trusted on my user account, so I can export it from certmgr.msc –  Matteo Mosca Dec 21 '11 at 13:37

2 Answers 2

up vote 3 down vote accepted

Follow these steps to trust a certificate system-wide:

  1. Double-click the .crt file.

  2. Click Install certificate..., then Next >.

  3. Choose Place all certificates in the following store and click Browse...

  4. Choose Trusted Root Certification Authorities and click OK.

  5. Click Next >, then Finish.

This has however the drawback that Windows will trust any certificate signed by the same CA.

share|improve this answer
    
I'll try and let you know. Thanks –  Matteo Mosca Dec 21 '11 at 14:03
    
not work for windows server 2008 sp2, not sure whether restart os required –  Scott混合理论 May 12 at 9:15

sorry @Dennis, but that's not the best turn, because your solution only installs the certificate for the local user, not for the complete system! It's valid and good to install personal certificates, but not root certificates!

better

  1. start mmc.exe as Admin mmc dialog
  2. File > Add Snap-In (Ctrl-M)
  3. add "Certificate" add snapins dialog a). if you are not prompted and the snapin is added instantly, go back to 1)

    b) select "Computeraccount" from popup, then proceed and select "local computer"

    c) you should see "Certificate (local computer)" Snapin on the right add snapin store selection d) confirm (OK)

  4. Then right click the correct section, subsection "Certificates", where desired certificate should be installed to.

  5. Select "All Tasks" > "Import" from context menu
  6. then it's same up from your description point 3, normally the correct store should already be preselected because you right-clicked on it

This will fix the untrusted cert message for ALL (future) computer users and for services not running with your credentials!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.