This seens to be a non frequent topic because I can´t find any reference of this.
Digital Certificates are stored in stores.
As you can see here…
How do I programmatically remove a certificate in Trusted Root Certification Authorities?
Where are stored the personal digital certificate?
The store name is My as we can see here:
http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.storename.aspx
But I need to find the location of the file itself to manipulate the certificate programatically.
Edit
I am also trying to print my cert name and path this way but I get nothing printed:
X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
X509Certificate2Collection storecollection =
(X509Certificate2Collection)store.Certificates;
Console.WriteLine("Store name: {0}", store.Name);
Console.WriteLine("Store location: {0}", store.Location);
foreach (X509Certificate2 x509 in storecollection)
{
Console.WriteLine("certificate name: {0}",x509.Subject);
}
There are no physical files for individual certificates as far as I know.
On second question: you are missing
Opencall likestore.Open(OpenFlags.ReadWrite);. See complete sample on MSDN X509Store.