CryptGetMessageSignerCount function
The CryptGetMessageSignerCount function returns the number of signers of a signed message.
Syntax
LONG WINAPI CryptGetMessageSignerCount(
_In_ DWORD dwMsgEncodingType,
_In_ const BYTE *pbSignedBlob,
_In_ DWORD cbSignedBlob
);
Parameters
- dwMsgEncodingType [in]
-
Specifies the encoding type 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
- pbSignedBlob [in]
-
A pointer to a buffer containing the signed message.
- cbSignedBlob [in]
-
The size, in bytes, of the signed message.
Return value
Returns the number of signers of a signed message, zero when there are no signers, and minus one (–1) for an error.
For extended error information, call GetLastError. The following error code is most commonly returned.
| Return code | Description |
|---|---|
|
Invalid message encoding type. Currently only PKCS_7_ASN_ENCODING is supported. |
If the function fails, GetLastError may return an Abstract Syntax Notation One (ASN.1) encoding/decoding error. For information about these errors, see ASN.1 Encoding/Decoding Return Values.
Examples
See Example C Program: Setting and Getting Certificate Store Properties.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also