Re: How to get KeyUsage field given .NET X509Certificate instance?

From: Pieter Philippaerts (Pieter_at_nospam.mentalis.org)
Date: 07/29/03

  • Next message: Shel Blauman [MSFT]: "Re: System.Security.Principal.WindowsImpersonation"
    Date: Tue, 29 Jul 2003 00:09:00 +0200
    
    

    "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
    > I'm trying to figure out a good way to get key usage information
    > (such as what is returned from the CAPICOM KeyUsage
    > object) if I have an instance of a .NET X509Certificate class.

    The .NET X509Certificate class does not have too many options, so you might
    want to consider switching to some other library that offers more options.
    CAPICOM is one choice, but for a non-COM way check out the Certificate
    Services library at http://www.mentalis.org/soft/projects/certificates/ It
    has a Certificate class that works like the .NET X509Certificate class but
    it has more options, including a method called GetIntendedKeyUsage that
    returns what you're looking for.

    > I guess I'm not sure how to instantiate a CAPICOM Certificate
    > object given a byte[]. Any ideas?

    Have you looked at Certificate.Import ?

    Regards,
    Pieter Philippaerts
    Managed SSL/TLS: http://www.mentalis.org/go.php?sl


  • Next message: Shel Blauman [MSFT]: "Re: System.Security.Principal.WindowsImpersonation"