Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This structure contains both the encoded and decoded representations of a certificate. A certificate context returned by one of the functions defined in the Wincrypt.h file must be freed by calling the CertFreeCertificateContextfunction. The CertDuplicateCertificateContextfunction can be called to make a duplicate copy, which also must be freed by calling the CertFreeCertificateContextfunction.

Syntax

typedef struct _CERT_CONTEXT {
  DWORD 
dwCertEncodingType;
  BYTE* 
pbCertEncoded;
  DWORD 
cbCertEncoded;
  PCERT_INFO 
pCertInfo;
  HCERTSTORE 
hCertStore;
} CERT_CONTEXT, *PCERT_CONTEXT;
typedef const CERT_CONTEXT *PCCERT_CONTEXT;

Members

dwCertEncodingType

Currently, only X509_ASN_ENCODING is used; however, additional encoding types may be added in the future.

pbCertEncoded

Pointer to the encoded certificate.

cbCertEncoded

Size, in bytes, of the encoded certificate.

pCertInfo

Pointer to a structure of certificate information.

hCertStore

Handle to the certificate store that contains the certificate context.

Requirements

Header wincrypt.h
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also