Hello, I'm looking for examples + information on how to extract certificate information from the windows certificate store and perform operations like verifying signatures using the retrieved certificates. The API documentation for C# in this regard is quite poor, with many of the entries in msdn marked with "This language is not supported, or no code example is available.", I'm sorry I can't be more specific, I haven't done any programming using cryptographic api's. The particular certificate will be provided via a USB token. Any help or pointers would be much appreciated, thanks.
+1
A:
Regarding the certificate store, you will want to look at the class called X509Store
. It will return instances of X509Certificate2
that you can work with. You can also get instances of X509Certificate2
from a file (the constructor that takes a string).
If you have access to the certificates' private key, you can use it to decrypt data by casting it to a DSACryptoServiceProvider
.
klausbyskov
2010-04-23 13:45:54
Thanks, that was a real needle in a haystack!
Gearoid Murphy
2010-04-23 13:51:06