CSSM_CL_CertGetFirstFieldValue

Purpose

This function returns the value of the designated certificate field. If more than one field matches the CertField OID, the first matching field will be returned. The number of matching fields is an output parameter, as is the ResultsHandle to be used to retrieve the remaining matching fields.

Format

CSSM_DATA_PTR CSSMAPI CSSM_CL_CertGetFirstFieldValue
                  (CSSM_CL_HANDLE CLHandle,
                  const CSSM_DATA_PTR Cert,
                  const CSSM_OID_PTR CertField,
                  CSSM_HANDLE_PTR ResultsHandle,
                  uint32 *NumberOfMatchedFields)

Parameters

Input

CLHandle
The handle that describes the CL module used to perform this function.
Cert
A pointer to the CSSM_DATA structure containing the certificate.
CertField
A pointer to an OID that identifies the field value to be extracted from the Cert.

Output

ResultsHandle
A pointer to the CSSM_HANDLE that should be used to obtain any additional matching fields.
NumberOfMatchedFields
The number of fields that match the CertField OID.

Return Value

A pointer to the CSSM_DATA structure containing the value of the requested field. If the pointer is NULL, an error has occurred. Use CSSM_GetError to obtain the error code.

Related Information

CSSM_CL_CertGetNextFieldValue
CSSM_CL_CertAbortQuery
CSSM_CL_CertGetAllFields