Skip to content

Latest commit

 

History

History
125 lines (91 loc) · 5.16 KB

nc-wincrypt-pfn_crypt_verify_encoded_signature_func.md

File metadata and controls

125 lines (91 loc) · 5.16 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NC:wincrypt.PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC
PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC (wincrypt.h)
Called to decrypt an encoded signature and compare it to a computed hash.
PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC
PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC callback
PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC callback function [Security]
security.pfn_crypt_verify_encoded_signature_func
wincrypt/PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC
security\pfn_crypt_verify_encoded_signature_func.htm
security
0093ce11-8b72-403d-a3fd-3eaf2dc29d71
12/05/2018
PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC, PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC callback, PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC callback function [Security], security.pfn_crypt_verify_encoded_signature_func, wincrypt/PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC
wincrypt.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
Windows
19H1
PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC
wincrypt/PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC
c++
APIRef
kbSyntax
UserDefined
Wincrypt.h
PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC

PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC callback function

-description

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

-parameters

-param 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

-param 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.

-param pSignatureAlgorithm [in]

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

-param 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.

-param pwszCNGPubKeyAlgid [in]

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

-param 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.

-param pbComputedHash [in]

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

-param cbComputedHash [in]

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

-param pbSignature [in]

A pointer to the encoded signature bytes.

-param cbSignature [in]

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

-returns

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.

Constant Definition
CRYPT_OID_VERIFY_ENCODED_SIGNATURE_FUNC "CryptDllVerifyEncodedSignature"