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

Developer

API Reference

ICERTPARSE_FIND()

Brew Release
Brew MP 1.0.2
Description
This function searches collections of certificates by subject, issuer and/or serial number
Params
pif
[]:
Instance of ICertParse
pOpts
[]:
opts to search or NULL
pstIssuerAndSerial
[]:
Issuer and/or serial number to search for
pnCertxOptID
[]:
xOpt type (cert type) of cert found
pnCertIndex
[]:
index of cert found
Interface
Prototype
  •    void ICertParse_Find
       (
          ICertParse* pif,
          const IxOpts  *pOpts,
          const CertDataIssuerAndSerial *pstIssuerAndSerial,
          int32 *pnCertXOpt,
          int32 *pnCertIndex
       );
    
Return
  • AEE_SUCCESS: certificate was found AEE_EFAILED: no certificate found AEE_EBADPARAM: if any of the parameters are NULL
    Can also return other implementation specific error codes.
Side Effect
  • None
Comments
The xOpt type and index returned are valid only until options (certs) are added to or removed from the collection. The search can be by issuer, by serial number or both. To not search by issuer or serial, set the associated pointer in pstIssuerAndSerial to NULL. The options searched include any sub IxOpts objects that have been added as XOPT_DEFAULTS. First options of type/id CERTDATAOPT_ROOT_CERTS are searched, then CERTDATAOPT_BRANCH_CERTS and finally CERTDATAOPT_LEAF_CERT. If the search is successful the certificate found is set as the one being parsed. This overrides any cert set by ICertParse_SetCert() or ICertParse_SetCertByOpt().