The CMSG_SIGNER_ENCODE_INFO structure is used to specify the signer information. This structure is passed to CryptMsgCountersign, CryptMsgCountersignEncoded, and optionally to CryptMsgOpenToEncode as a member of CMSG_SIGNED_ENCODE_INFO for a value of CMSG_SIGNED in dwMsgType.
typedef struct _CMSG_SIGNER_ENCODE_INFO {
DWORD cbSize;
PCERT_INFO pCertInfo;
HCRYPTPROV hCryptProv;
DWORD dwKeySpec;
CRYPT_ALGORITHM_IDENTIFIER HashAlgorithm;
void* pvHashAuxInfo;
DWORD cAuthAttr;
PCRYPT_ATTRIBUTE rgAuthAttr;
DWORD cUnauthAttr;
PCRYPT_ATTRIBUTE rgUnauthAttr;
} CMSG_SIGNER_ENCODE_INFO, *PCMSG_SIGNER_ENCODE_INFO;
Issuer
SerialNumber
SubjectPublicKeyInfo.Algorithm
The contents of the Issuer and SerialNumber data structures, combined are a unique identifier of a certificate. The Algorithm member of the SubjectPublicKeyInfo data structure specifies the hash encryption algorithm used.
The following dwKeySpec values are defined in Wincrypt.h for the default provider:
#define AT_KEYEXCHANGE 1
#define AT_SIGNATURE 2
If dwKeySpec is zero, then the default AT_SIGNATURE is used.
CERT_INFO, CRYPT_ALGORITHM_IDENTIFIER, CRYPT_ATTRIBUTE, CryptMsgControl, CryptMsgCountersign