Certificate extensions via .NET and P/Invoke
From: Michel Gallant (neutron_at_nspxistar.ca)
Date: 10/04/03
- Next message: Keith Patrick: "Problem with permissions and strong-named assemblies"
- Previous message: Pieter Philippaerts: "Re: Is there any asymmetric crypto API to allow decrypting a message but not encrypting it?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 3 Oct 2003 22:19:54 -0400
Quite a few folks have asked how to access X509 certificate extensions
from .NET code.
Currently System.Security.Cryptography.X509Certificates.X509Certificate
has only basic support for accessing certificate fields, but no support for
extensions and no support for CryptoAPI certificate stores.
Some of this is (evidently) coming in Whidbey and will be very welcome.
Meanwhile, and to support .NET 1.0/1.1, here is some sample code
showing how to access all the standard extensions for a certificate in a
CryptoAPI certificate store, and how to decode the extensions and marshal
data in the returned decoded structures:
http://pages.istar.ca/~neutron/feature/CertAttributes
The code will demonstrate some standard techniques for marshaling data
and using IntPtr to access struct members.
- Michel Gallant
Visual Security MVP
- Next message: Keith Patrick: "Problem with permissions and strong-named assemblies"
- Previous message: Pieter Philippaerts: "Re: Is there any asymmetric crypto API to allow decrypting a message but not encrypting it?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|