Expand Minimize

CTL_CONTEXT structure

The CTL_CONTEXT structure contains both the encoded and decoded representations of a CTL. It also contains an opened HCRYPTMSG handle to the decoded, cryptographically signed message containing the CTL_INFO as its inner content.

CryptoAPI low-level message functions can be used to extract additional signer information.

A CTL_CONTEXT returned by any CryptoAPI function must be freed by calling the CertFreeCTLContext function.

Syntax


typedef struct _CTL_CONTEXT {
  DWORD      dwMsgAndCertEncodingType;
  BYTE       *pbCtlEncoded;
  DWORD      cbCtlEncoded;
  PCTL_INFO  pCtlInfo;
  HCERTSTORE hCertStore;
  HCRYPTMSG  hCryptMsg;
  BYTE       *pbCtlContent;
  DWORD      cbCtlContent;
} CTL_CONTEXT, *PCTL_CONTEXT;typedef const CTL_CONTEXT *PCCTL_CONTEXT;

Members

dwMsgAndCertEncodingType

Type of encoding used. It is always acceptable to specify both the certificate and message encoding types by combining them with a bitwise-OR operation as shown in the following example:

X509_ASN_ENCODING | PKCS_7_ASN_ENCODING

Currently defined encoding types are:

  • X509_ASN_ENCODING
  • PKCS_7_ASN_ENCODING
pbCtlEncoded

A pointer to the encoded CTL.

cbCtlEncoded

The size, in bytes, of the encoded CTL.

pCtlInfo

A pointer to CTL_INFO structure contain the CTL information.

hCertStore

A handle to the certificate store.

hCryptMsg

Open HCRYPTMSG handle to a decoded, cryptographic-signed message containing the CTL_INFO as its inner content.

pbCtlContent

The encoded inner content of the signed message.

cbCtlContent

Count, in bytes, of pbCtlContent.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wincrypt.h

See also

CTL_INFO
CertAddCTLContextToStore
CertAddEncodedCTLToStore
CertCreateCTLContext
CertEnumCTLsInStore
CertFindCTLInStore
CertFindSubjectInCTL
CertFreeCTLContext
CryptMsgGetAndVerifySigner
CryptMsgSignCTL

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.