views:

3074

answers:

2

Where can I find the windows certificate store location on the hard drive for server 2003. I am coding a c# utility for managing few certificates we use to notify when they are expiring. So, I choose to store them in the windows certificate store. Instead of using any existing location(Personal...) that I see in MMC I would like to create another location with my application name and a place(eg: 'c:\certs') of my choice, so that I can back up

+2  A: 

I strongly suspect that you don't need to create your own location. Do you have a good reason for wanting one? Windows has APIs to manage certificates, and I would suggest looking into those. I am pretty sure you can do all reasonable things though the public API. If you use the APIs with the system store, you will likely have to write less code, and your resulting solution will be more secure, better integrated with the OS (and all the OTHER tooling built for dealing with certs on windows)

I am writing the utility in .net and ofcourse using its API. I just wanted to choose my own name for the store and its location on the hard drive
Syam
@Syam: System.Security.Cryptography.X509Certificates.StoreName is an enumeration, this strongly indicates that the list of stores is fixed.
Richard
@Syam -- if you use the API, why do you care where the actual certs are located? Just write the code to enumerate the damn things, check the expiration (or whatever it is you need) and be done with it :) This stuff is delicate enough as it is (it took me long enough to make WSE3 talk to Axis with x.509 encryption and signatures. If the mix had some custom code messing with the cert store, I'd go crazy)
A: 

(Forgive the late reply)

I'm not sure on this one Syam, but at least the private keys involved in the certificates could be here: C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto

Again, this is not something I'm sure of.

alfamega