Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to reimport a certificate, except this time i want to import it with an exportable private key. I have the sneaking suspicion that since windows 7 does not actually delete the private key when you delete the cert, i need to manually delete the private key in order to change the properties on it.

Anyone know how i can delete the private key from a windows 7 box?

Thanks for any help,

share|improve this question

2 Answers 2

I dont think deleting the private key is necessary before you reimport the cert. The new cert is very likely to have a new public key signed in it (with a corresponding different private key). As long as whoever that needs the private key has the right ACL set on the private key, you should be good.

If you wanted to see where the private key is all folders relevant are documented at http://msdn.microsoft.com/en-us/library/bb204778(VS.85).aspx

share|improve this answer

I know, this is quite old question, but I facing similar issue (need to remove private key) and here is the solution http://seclists.org/fulldisclosure/2006/Apr/164

Hi, This applies for all MS Windows versions.

If you have a certificate installed on HD (i.e. using the MS Enhaced CSP), then, following Microsoft, you can remove it using IExplorer, on the Tools menu, you click Internet Options, then you click the* Content* tab, and then click Remove. This is a well known action described in http://www.microsoft.com/technet/prodtechnol/ie/reskit/6/part2/c06ie6rk.mspx?mfr=true

Doing this, you effectively remove the certificate, but THE PRIVATE KEY REMAINS IN THE HD. You can find a lot of scenarios where this can be a problem. Suppose you go to a friend's home, you install a pkcs12 file containing your certificate and private key with "Medium" security level (the default), then you use it, and when you finishes your work, you remove the certificate (but NO the private key). Then your friend takes your certificate (is a public document) and installs it, having your private key working for him.

The program cleancapi deletes the private keys that are not used by any certificate. Source code: http://dwnl.nisu.org/dwnl?fic=cleancapi_0_2_src.zip Precompiled version: http://dwnl.nisu.org/dwnl?fic=cleancapi_0_2_bin.zip

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.