API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
CertDataCertPart, CertDataPartRequest, ICertParse_GetField()
This function gets individual X.509 v3 extensions or parts out of the subject or issuer DN.
Instance of ICertParse
The description of the request
Filled in with the response.
  •    int ICertParse_GetFieldPart
          const ICertParse *pif,
          const CertDataPartRequest *pReq,
          CertDataCertPart *pPart
  • AEE_SUCCESS: Field part was returned AEE_EFAILED: No certificate set AEE_EBADPARM: asked for a field that we don't know about AEESEC_X509_BAD_CERT: the certificate was NULL or can't be parsed AEESEC_X509_NO_PART: could not find an instance of OID requested
    Can also return other implementation specific error codes.
Side Effect
  • None
While certificate extensions and subject and issuer parts aren't semantically related, they are similar enough in structure that this same function is used to get them. The descriptions of the data structures CertDataPartRequest and CertDataCertPart describe how to get the different parts by OID or by ASN1OID (our local abbreviations for well known OIDs). This can be used to iterate over all parts in a field, or over just the values for a particular OID (if there happens to be more than one instances of an OID; the OU part is often duplicated in a subject or issuer). To do the iteration, fetch the 0th instance in a field. The response gives as bonus info, the number of instances in the field, and thus you know how far to iterate. You can also iterate until AEE_EFAILED is returned. If you want all parts of a field, pass in ASNOID_ANY as the OID to look for. The lifetimes are the same as the ones described for ICertParse_GetField.