The CTL_CONTEXT structure. A CTL context contains both the encoded and decoded representations of a CTL. It also contains an opened HCRYPTMSG handle to the decoded cryptographic signed message containing the CTL_INFO as its inner content.
The CryptMsg APIs can be used to extract additional signer information.
A CTL context returned by a certificate store function must be freed by calling the CertFreeCTLContext function. The CertDuplicateCTLContext function can be called to make a duplicate copy (which also must be freed by calling CertFreeCTLContext).
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;
X509_ASN_ENCODING | PKCS_7_ASN_ENCODING
Currently defined encoding types are shown in the following table.
Encoding type | Value |
---|---|
X509_ASN_ENCODING | 0x00000001 |
PKCS_7_ASN_ENCODING | 0x00010000 |
CTL_INFO, CertAddCTLContextToStore, CertAddEncodedCTLToStore, CertCreateCTLContext, CertEnumCTLsInStore, CertFindCTLInStore, CertFindSubjectInCTL, CertFreeCTLContext, CryptMsgGetAndVerifySigner, CryptMsgSignCTL