WTHelperGetProvSignerFromChain function

[The WTHelperGetProvSignerFromChain function is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. For certificate verification, use the CertGetCertificateChain and CertVerifyCertificateChainPolicy functions. For Microsoft Authenticode technology signature verification, use the .NET Framework.]

The WTHelperGetProvSignerFromChain function retrieves a signer or countersigner by index from the chain. This function has no associated import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to Wintrust.dll.

Syntax

CRYPT_PROVIDER_SGNR * WTHelperGetProvSignerFromChain(
  CRYPT_PROVIDER_DATA *pProvData,
  DWORD               idxSigner,
  BOOL                fCounterSigner,
  DWORD               idxCounterSigner
);

Parameters

pProvData

A pointer to the CRYPT_PROVIDER_DATA structure that contains the signer and countersigner information.

idxSigner

The index of the signer. The index is zero based.

fCounterSigner

If TRUE, the countersigner, as specified by idxCounterSigner, is retrieved by this function; the signer that contains the countersigner is identified by idxSigner. If FALSE, the signer, as specified by idxSigner, is retrieved by this function.

idxCounterSigner

The index of the countersigner. The index is zero based. The countersigner applies to the signer identified by idxSigner.

Return Value

If the function succeeds, the function returns a pointer to a CRYPT_PROVIDER_SGNR structure for the requested signer or countersigner.

If the function fails, it returns NULL.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header wintrust.h
Library Wintrust.lib
DLL Wintrust.dll

See Also

WTHelperGetProvCertFromChain