Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function finds the first extension in the CERT_EXTENSIONarray, as identified by its object identifier (OID). This function can be used in the processing of a decoded certificate. A CERT_INFOstructure is derived from a decoded certificate. The rgExtensionarray is retrieved from that structure and passed to this function in the rgExtensionparameter. This function determines whether a particular extension is in the array, and if so, returns a pointer to it.

Syntax

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

Parameters

pszObjId

[in] Pointer to the OID to use in the search.

cExtensions

[in] Number of extensions in the rgExtensionsarray.

rgExtensions

[in] Array of CERT_EXTENSIONstructures.

Return Value

This function returns a pointer to the extension, if one is found. Otherwise, NULL is returned.

Requirements

Header wincrypt.h
Library crypt32.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also