views:

521

answers:

2

How do you enumerate the fields of a certificate help in a store. Specifically, I am trying to enumerate the fields of personal certificates issued to the logged on user.

+1  A: 

See http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509store.aspx

using System.Security.Cryptography.X509Certificates;
...
var store = new X509Store(StoreName.My);
foreach(var cert in store.Certificates)
...
Duncan Smart
A: 

You also must use store.open() before you can access the store.