Export (0) Print
Expand All
Expand Minimize

PFN_CRYPT_EXTRACT_ENCODED_SIGNATURE_PARAMETERS_FUNC function pointer

If a signature contains encoded parameters, the PFN_CRYPT_EXTRACT_ENCODED_SIGNATURE_PARAMETERS_FUNC callback function is called to decode and return the hash algorithm identifier and optionally the signature parameters.

Syntax


typedef BOOL ( WINAPI *PFN_CRYPT_EXTRACT_ENCODED_SIGNATURE_PARAMETERS_FUNC)(
  _In_       DWORD dwCertEncodingType,
  _In_       PCRYPT_ALGORITHM_IDENTIFIER pSignatureAlgorithm,
  _Out_opt_  void **ppvDecodedSignPara,
  _Out_      LPWSTR *ppwszCNGHashAlgid
);

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
pSignatureAlgorithm [in]

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

ppvDecodedSignPara [out, optional]

A pointer to an address for the decoded and allocated signature parameters data structure. Returning the decoded buffer is optional.

ppwszCNGHashAlgid [out]

A pointer to an address for the allocated Unicode string that represents the CNG hash algorithm identifier extracted from the encoded signature parameters. If this function returns TRUE, a non-NULL pointer must be returned.

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

Memory for the ppvDecodedSignPara and ppwszCNGHashAlgid parameters must be allocated by using the LocalAlloc function.

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

ConstantDefinition
CRYPT_OID_EXTRACT_ENCODED_SIGNATURE_PARAMETERS_FUNC"CryptDllExtractEncodedSignatureParameters"

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Wincrypt.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft