EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC function pointer

The PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC callback function is called to decrypt an encoded signature and compare it to a computed hash.

Syntax


typedef BOOL ( WINAPI *PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC)(
  _In_      DWORD dwCertEncodingType,
  _In_      PCERT_PUBLIC_KEY_INFO pPubKeyInfo,
  _In_      PCRYPT_ALGORITHM_IDENTIFIER pSignatureAlgorithm,
  _In_opt_  void *pvDecodedSignPara,
  _In_      LPCWSTR pwszCNGPubKeyAlgid,
  _In_      LPCWSTR pwszCNGHashAlgid,
  _In_      BYTE *pbComputedHash,
  _In_      DWORD cbComputedHash,
  _In_      BYTE *pbSignature,
  _In_      DWORD cbSignature
);

Parameters

dwCertEncodingType [in]

Specifies the type of encoding 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
pPubKeyInfo [in]

The address of a CERT_PUBLIC_KEY_INFO structure that contains the public key to use to verify the signature. You can use this with CryptImportPublicKeyInfoEx2 to get a BCRYPT_KEY_HANDLE.

pSignatureAlgorithm [in]

A pointer to a CRYPT_ALGORITHM_IDENTIFIER structure that contains the signature object identifier (OID) and its optional encoded parameters.

pvDecodedSignPara [in, optional]

An optional pointer to the decoded signature parameters data structure previously returned by the PFN_CRYPT_EXTRACT_ENCODED_SIGNATURE_PARAMETERS_FUNC function.

pwszCNGPubKeyAlgid [in]

A Unicode string that contains the Cryptography API: Next Generation (CNG) public key algorithm identifier that corresponds to pSignatureAlgorithm->pszObjId.

pwszCNGHashAlgid [in]

A Unicode string that contains the CNG hashing algorithm identifier that corresponds to pSignatureAlgorithm->pszObjId or to a hash algorithm identifier in pvDecodedSignPara.

pbComputedHash [in]

A pointer to the computed hash bytes returned by the BCryptFinishHash function that corresponds to pwszCNGHashAlgid.

cbComputedHash [in]

A value that represents the length, in bytes, of the computed hash.

pbSignature [in]

A pointer to the encoded signature bytes.

cbSignature [in]

A value that represents the length, in bytes, of the encoded signature.

Return value

If the function succeeds, the function returns nonzero (TRUE).

If the function fails, it returns zero (FALSE). For extended error information, call GetLastError.

If this callback function does not support the signature algorithm, it must return FALSE and call SetLastError with ERROR_NOT_SUPPORTED.

Remarks

You can use OID Support Functions to deploy this callback function. Wincrypt.h defines the following constant for this purpose.

ConstantDefinition
CRYPT_OID_VERIFY_ENCODED_SIGNATURE_FUNC"CryptDllVerifyEncodedSignature"

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Wincrypt.h

 

 

Ajouts de la communauté

AJOUTER
Afficher:
© 2014 Microsoft