CryptMsgGetAndVerifySigner function (wincrypt.h)
The CryptMsgGetAndVerifySigner function verifies a cryptographic message's signature.
Syntax
BOOL CryptMsgGetAndVerifySigner(
[in] HCRYPTMSG hCryptMsg,
[in] DWORD cSignerStore,
[in, optional] HCERTSTORE *rghSignerStore,
[in] DWORD dwFlags,
[out, optional] PCCERT_CONTEXT *ppSigner,
[in, out, optional] DWORD *pdwSignerIndex
);
Parameters
[in] hCryptMsg
Handle of a cryptographic message.
[in] cSignerStore
Number of stores in the rghSignerStore array.
[in, optional] rghSignerStore
Array of certificate store handles that can be searched for a signer's certificate.
[in] dwFlags
Indicates particular use of the function.
[out, optional] ppSigner
If the signature is verified, ppSigner is updated to point to the signer's certificate context. When you have finished using the certificate, free the context by calling the CertFreeCertificateContext function. This parameter can be NULL if the application has no need for the signer's certificate.
[in, out, optional] pdwSignerIndex
If the signature is verified, pdwSigner is updated to point to the index of the signer in the array of signers. This parameter can be NULL if the application has no need for the index of the signer.
Return value
If the function succeeds, the return value is nonzero (TRUE).
If the function fails, the return value is zero (FALSE). For extended error information, call GetLastError.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2003 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | wincrypt.h |
Library | Crypt32.lib |
DLL | Crypt32.dll |