CertFindExtension function

The CertFindExtension function finds the first extension in the CERT_EXTENSION array, as identified by its object identifier (OID). This function can be used in the processing of a decoded certificate. A CERT_INFO structure is derived from a decoded certificate. The CERT_INFO structure's rgExtension member is passed to CertFindExtension in the rgExtensions parameter. This function determines whether a particular extension is in the array, and if so, returns a pointer to it

Syntax

PCERT_EXTENSION CertFindExtension(
  LPCSTR            pszObjId,
  DWORD             cExtensions,
  CERT_EXTENSION [] rgExtensions
);

Parameters

pszObjId

A pointer to the object identifier (OID) to use in the search.

cExtensions

Number of extensions in the rgExtensions array.

rgExtensions

Array of CERT_EXTENSION structures.

Return Value

Returns a pointer to the extension, if one is found. Otherwise, NULL is returned.

Requirements

   
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header wincrypt.h
Library Crypt32.lib
DLL Crypt32.dll

See Also

CertFindAttribute

CertFindRDNAttr

Data Management Functions