Expand Minimize
EN
Deze inhoud is niet beschikbaar in uw taal, maar wel in het Engels.

CryptMsgGetAndVerifySigner function

The CryptMsgGetAndVerifySigner function verifies a cryptographic message's signature.

Syntax


BOOL WINAPI CryptMsgGetAndVerifySigner(
  _In_         HCRYPTMSG hCryptMsg,
  _In_         DWORD cSignerStore,
  _In_opt_     HCERTSTORE *rghSignerStore,
  _In_         DWORD dwFlags,
  _Out_opt_    PCCERT_CONTEXT *ppSigner,
  _Inout_opt_  DWORD *pdwSignerIndex
);

Parameters

hCryptMsg [in]

Handle of a cryptographic message.

cSignerStore [in]

Number of stores in the rghSignerStore array.

rghSignerStore [in, optional]

Array of certificate store handles that can be searched for a signer's certificate.

dwFlags [in]

Indicates particular use of the function.

ValueMeaning
CMSG_TRUSTED_SIGNER_FLAG

The stores in rghSignerStore are assumed trusted and they are the only stores searched to find the certificate corresponding to the signer's issuer and serial number. Otherwise, signer stores can be provided to supplement the message's store of certificates. If a signer certificate is found, its public key is used to verify the message signature.

CMSG_SIGNER_ONLY_FLAG

Return the signer without doing the signature verification.

CMSG_USE_SIGNER_INDEX_FLAG

Only the signer specified by *pdwSignerIndex is returned. Otherwise, iterate through all the signers until a signature is verified or there are no more signers.

 

ppSigner [out, optional]

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.

pdwSignerIndex [in, out, optional]

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

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wincrypt.h

Library

Crypt32.lib

DLL

Crypt32.dll

See also

Verification Functions Using CTLs
CERT_CONTEXT
CTL_CONTEXT
CryptMsgOpenToDecode
CryptMsgControl

 

 

Community-inhoud

Toevoegen
Weergeven:
© 2014 Microsoft. Alle rechten voorbehouden.