Re: PKCS #7 with Certification Path for a single certificate...

From: Krish Shenoy[MSFT] (
Date: 01/26/04

Date: Mon, 26 Jan 2004 13:28:49 -0800

You can either use CAPICOM(easiest but CAPICOM is not available by default
on the OS) or you can use CryptQueryObject with the flags
BOOL WINAPI CryptQueryObject(
  DWORD dwObjectType,
  const void* pvObject,
  DWORD dwExpectedContentTypeFlags,
  DWORD dwExpectedFormatTypeFlags,
  DWORD dwFlags,
  DWORD* pdwMsgAndCertEncodingType,
  DWORD* pdwContentType,
  DWORD* pdwFormatType,
  HCERTSTORE* phCertStore,
  const void** ppvContext

Krish Shenoy[MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Michael Virgil" <> wrote in message
> Hi,
> I'm trying to create a PKCS #7 (in memory BLOB) with a complete
Certification Path for a single certificate. What Crypto API function to
call? I don't see anything like CertSaveStore() for s single certificate
> ICertRequest.GetCertificate() looks like what I need, but is only
available on the Windows Server 2003 or Windows 2000 Server. Is there a
Crypto-API client side equivalent?
> Has anyone done this? How was it done?
> It obviously can be done; IE allows a user to export to a file the PKCS #7
message with a complete certificate path included. I just can't find the
right API.
> Thanks,
> Michael