PstGetCertificates function (certpoleng.h)

Retrieves certificate chains that specify certificates that can be used to authenticate a user on the specified server.

Syntax

NTSTATUS PstGetCertificates(
  [in]           PUNICODE_STRING        pTargetName,
  [in]           DWORD                  cCriteria,
  [in, optional] PCCERT_SELECT_CRITERIA rgpCriteria,
  [in]           BOOL                   bIsClient,
  [out]          PDWORD                 pdwCertChainContextCount,
  [out]          PCCERT_CHAIN_CONTEXT   **ppCertChainContexts
);

Parameters

[in] pTargetName

The name of the server to check.

[in] cCriteria

The number of elements in the rgpCriteria array.

[in, optional] rgpCriteria

A constant pointer to an array of CERT_SELECT_CRITERIA structures that specify the criteria used to select certificate chains.

[in] bIsClient

TRUE if the caller is the client; otherwise, FALSE.

[out] pdwCertChainContextCount

The number of elements in the ppCertChainContexts array.

[out] ppCertChainContexts

The address of a pointer to an array of CERT_CHAIN_CONTEXT structures that specifies the certificate chains of certificates that can be used to authenticate a user on the server specified by the pTargetName parameter.

Return value

If the function succeeds, return STATUS_SUCCESS.

If the function fails, return an NTSTATUS code that indicates the reason it failed.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header certpoleng.h
Library Certpoleng.lib
DLL Certpoleng.dll