Re: parsing pkcs#7 string

From: Michel Gallant (neutron_at_NOSPAMistar.ca)
Date: 12/02/03


Date: Tue, 2 Dec 2003 16:31:58 -0500


(1)In CAPICOM you can use:
 SignedData.Certificates collection and
 SignedData.Signers collection

Note however that for these collections to be valid and available,
the signature verification must be executed first and succeed:
 SignedData.Verify()

(2) In CryptoAPI, you can open a CMS/PKCS #7 Signed or Enveloped message and then get the
certificates by executing:
  CryptMsgOpenToDecode()
  CryptMsgUpdate()
and then
  CryptMsgGetParam() with
with dwParamType = CMSG_CERT_COUNT_PARAM and CMSG_CERT_PARAM
to get all the certificates.

 - Mitch Gallant

"lamquoc" <lamquoc.xtw6a@mail.mcse.ms> wrote in message news:lamquoc.xtw6a@mail.mcse.ms...
>
> I'm wondering if there is any class in CAPICOM that can parse the pkcs#7
> string? I try to extract the certificates in the pkcs#7 but so far
> have not found a way to do this in Microsoft development world.
> I saw someone posted this question earlier, but the link refered in
> there is dead.
> Thanks,
> Lam
>
>
> lamquoc
> ------------------------------------------------------------------------
> Posted via http://www.mcse.ms
> ------------------------------------------------------------------------
> View this thread: http://www.mcse.ms/message136168.html
>



Relevant Pages

  • Re: Getting X509 Certificates from PKCS#7
    ... native CryptoApi is very hard from VB6). ... Under CAPICOM, you can merely iterate through the Certificates collection ... Tested sending X509 Certificates to the Authentication server over ...
    (microsoft.public.vb.winapi)
  • Re: Word 2003..."Next Record" not working properly?
    ... It sounds to me like you are not actually executing the merge, ... She is creating a merge document for certificates ... > The problem is that the second record on the first page of the ... > expect Word to jump to the next record when the page changes, ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Only 1 certificate in smartcard store
    ... You may be unwittingly relying on some default behavior in capicom. ... > the certificates wiht outlook and office an windows lognon. ... > capicom we can only read the windwos logon certificate and the certificat ...
    (microsoft.public.platformsdk.security)
  • Re: RSA Encrypt/Decrypt Problems
    ... I have downloaded CAPICOM and am reading Michel's ... > CAPICOM really excels at facilitating searching for and using certificates in capi stores, ...
    (microsoft.public.dotnet.security)
  • Re: Generating X.509 certificates programatically (self-signed)
    ... CAPICOM can currently do neither. ... For CryptoAPI, there is a good sample in psdk showing how to programatically ... generate certificates with various standard extensions, ... another interesting mix/match possibility is to use the CEnroll ...
    (microsoft.public.dotnet.security)

Quantcast