WTHelperGetProvCertFromChain function (wintrust.h)

[The WTHelperGetProvCertFromChain 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 WTHelperGetProvCertFromChain function retrieves a trust provider certificate from the certificate 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_CERT * WTHelperGetProvCertFromChain(
  [in] CRYPT_PROVIDER_SGNR *pSgnr,
  [in] DWORD               idxCert
);

Parameters

[in] pSgnr

A pointer to a CRYPT_PROVIDER_SGNR structure that represents the signers. This pointer is retrieved by the WTHelperGetProvSignerFromChain function.

[in] idxCert

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

Return value

If the function succeeds, the function returns a pointer to a CRYPT_PROVIDER_CERT structure that represents the trust provider certificate.

If the function fails, it returns NULL.

Requirements

Requirement Value
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

WTHelperGetProvSignerFromChain