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

From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 07/29/03


Date: Tue, 29 Jul 2003 10:47:38 -0500


Thanks a lot. You guys rock.

Joe K.

"Michel Gallant" <neutron@istar.ca> wrote in message
news:e4YfFgdVDHA.3088@tk2msftngp13.phx.gbl...
> Hi Joe,
>
> CAPICOM has some utilities methods. Here is a simple
> script approach, which first converts a byte array (body) to
> a BSTR and then you can proceed. Similar approaches work
> for .NET
> - Mitch Gallant
>
> -------------
> set oUtils = CreateObject("CAPICOM.Utilities")
> set oCert = CreateObject("CAPICOM.Certificate")
> ... get byte array 'body' from somewhere
> certStr = oUtils.ByteArrayToBinaryString(body)
> oCert.Import(certStr)
> oCert.Display()
> ---------------
>
> "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
in message
> news:%23GwG2hZVDHA.3376@tk2msftngp13.phx.gbl...
> > Thanks. Import looks promising, but it takes a string and it isn't
clear to
> > me what format that should be from the documentation. Base64? Pretty
> > vague...
> >
> >
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/certificate_import.asp?frame=true
> >
> > I'll check out your library as it sounds very promising.
> >
> > Joe K.
> >
> > "Pieter Philippaerts" <Pieter@nospam.mentalis.org> wrote in message
> > news:%23Hy8xQVVDHA.3376@tk2msftngp13.phx.gbl...
> > > "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
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: How to get KeyUsage field given .NET X509Certificate instance?
    ... Hi Joe, ... CAPICOM has some utilities methods. ... which first converts a byte array to ... Import looks promising, but it takes a string and it isn't clear to ...
    (microsoft.public.dotnet.security)
  • Re: Civil War: No wrong side, my ass! (ASM Spoilers)
    ... Joe Q. promised a high bodycount in Disassembled, ... Parker, the "everyman" the readers will live Civil War through, ... Not looking as promising as it once did, ... And if the rumor that I've heard is true, there are going to be a lot ...
    (rec.arts.comics.marvel.universe)
  • Re: SuSE Pro Pre-order
    ... Joe I wrote: ... > Seems like you can only pre-order the full version and not the upgrade. ... that would be the first time that marketing would forget to inform ... however looks promising for wireless people ...
    (alt.os.linux.suse)
  • Re: Ladies, gentlemen, thank you.
    ... Joe - I've got the program and it looks most promising. ... play and it looks as though it will do a pretty good job for me as far as my ... neices pics go - not exactly as per, ...
    (uk.people.silversurfers)
  • Re: Porting from VC6 to VS2005
    ... I didn't find anything on a quick search, but that sounds promising. ... looking at the header files. ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)