Skip to content

Commit a96f20e

Browse files
committed
Add documentation for new OCSP responder and cert accessor APIs
1 parent b5874a6 commit a96f20e

2 files changed

Lines changed: 418 additions & 0 deletions

File tree

doc/dox_comments/header_files/asn_public.h

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3372,6 +3372,93 @@ int wc_GetSubjectPubKeyInfoDerFromCert(const byte* certDer,
33723372
byte* pubKeyDer,
33733373
word32* pubKeyDerSz);
33743374

3375+
/*!
3376+
\ingroup ASN
3377+
3378+
\brief Retrieves the subject name from a decoded certificate.
3379+
3380+
This function copies the subject name string from a DecodedCert
3381+
structure into the provided buffer. If buf is NULL, the required
3382+
buffer size is returned in bufSz and LENGTH_ONLY_E is returned.
3383+
3384+
\param cert Pointer to the DecodedCert (must have been parsed).
3385+
\param buf Output buffer to receive the subject name string,
3386+
or NULL to query the required size.
3387+
\param bufSz Pointer to the buffer size. On input, the available
3388+
buffer size. On output, the number of bytes written
3389+
or the required size if buf is NULL.
3390+
3391+
\return 0 on success.
3392+
\return LENGTH_ONLY_E when buf is NULL (bufSz contains required size).
3393+
\return BAD_FUNC_ARG if cert or bufSz is NULL.
3394+
\return BUFFER_E if the provided buffer is too small.
3395+
3396+
\sa wc_GetDecodedCertIssuer
3397+
\sa wc_GetDecodedCertSerial
3398+
\sa wc_InitDecodedCert
3399+
\sa wc_ParseCert
3400+
*/
3401+
int wc_GetDecodedCertSubject(const struct DecodedCert* cert,
3402+
char* buf, word32* bufSz);
3403+
3404+
/*!
3405+
\ingroup ASN
3406+
3407+
\brief Retrieves the issuer name from a decoded certificate.
3408+
3409+
This function copies the issuer name string from a DecodedCert
3410+
structure into the provided buffer. If buf is NULL, the required
3411+
buffer size is returned in bufSz and LENGTH_ONLY_E is returned.
3412+
3413+
\param cert Pointer to the DecodedCert (must have been parsed).
3414+
\param buf Output buffer to receive the issuer name string,
3415+
or NULL to query the required size.
3416+
\param bufSz Pointer to the buffer size. On input, the available
3417+
buffer size. On output, the number of bytes written
3418+
or the required size if buf is NULL.
3419+
3420+
\return 0 on success.
3421+
\return LENGTH_ONLY_E when buf is NULL (bufSz contains required size).
3422+
\return BAD_FUNC_ARG if cert or bufSz is NULL.
3423+
\return BUFFER_E if the provided buffer is too small.
3424+
3425+
\sa wc_GetDecodedCertSubject
3426+
\sa wc_GetDecodedCertSerial
3427+
\sa wc_InitDecodedCert
3428+
\sa wc_ParseCert
3429+
*/
3430+
int wc_GetDecodedCertIssuer(const struct DecodedCert* cert,
3431+
char* buf, word32* bufSz);
3432+
3433+
/*!
3434+
\ingroup ASN
3435+
3436+
\brief Retrieves the serial number from a decoded certificate.
3437+
3438+
This function copies the serial number bytes from a DecodedCert
3439+
structure into the provided buffer. If buf is NULL, the required
3440+
buffer size is returned in bufSz and LENGTH_ONLY_E is returned.
3441+
3442+
\param cert Pointer to the DecodedCert (must have been parsed).
3443+
\param buf Output buffer to receive the serial number bytes,
3444+
or NULL to query the required size.
3445+
\param bufSz Pointer to the buffer size. On input, the available
3446+
buffer size. On output, the number of bytes written
3447+
or the required size if buf is NULL.
3448+
3449+
\return 0 on success.
3450+
\return LENGTH_ONLY_E when buf is NULL (bufSz contains required size).
3451+
\return BAD_FUNC_ARG if cert or bufSz is NULL.
3452+
\return BUFFER_E if the provided buffer is too small.
3453+
3454+
\sa wc_GetDecodedCertSubject
3455+
\sa wc_GetDecodedCertIssuer
3456+
\sa wc_InitDecodedCert
3457+
\sa wc_ParseCert
3458+
*/
3459+
int wc_GetDecodedCertSerial(const struct DecodedCert* cert,
3460+
byte* buf, word32* bufSz);
3461+
33753462
/*!
33763463
\ingroup ASN
33773464
\brief Extracts UUID from certificate.

0 commit comments

Comments
 (0)