@@ -3378,15 +3378,20 @@ int wc_GetSubjectPubKeyInfoDerFromCert(const byte* certDer,
33783378 \brief Retrieves the subject name from a decoded certificate.
33793379
33803380 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.
3381+ structure into the provided buffer. The string uses a one-line
3382+ distinguished name format with "/" delimiters
3383+ (e.g. "/C=US/O=Org/CN=example.com"). The output is NOT
3384+ NUL-terminated; the caller should append a NUL byte if needed.
3385+ If buf is NULL, the required buffer size is returned
3386+ in bufSz and LENGTH_ONLY_E is returned.
33833387
33843388 \param cert Pointer to the DecodedCert (must have been parsed).
33853389 \param buf Output buffer to receive the subject name string,
33863390 or NULL to query the required size.
33873391 \param bufSz Pointer to the buffer size. On input, the available
33883392 buffer size. On output, the number of bytes written
3389- or the required size if buf is NULL.
3393+ (excluding any NUL terminator) or the required size
3394+ if buf is NULL.
33903395
33913396 \return 0 on success.
33923397 \return LENGTH_ONLY_E when buf is NULL (bufSz contains required size).
@@ -3407,15 +3412,20 @@ int wc_GetDecodedCertSubject(const struct DecodedCert* cert,
34073412 \brief Retrieves the issuer name from a decoded certificate.
34083413
34093414 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.
3415+ structure into the provided buffer. The string uses a one-line
3416+ distinguished name format with "/" delimiters
3417+ (e.g. "/C=US/O=Org/CN=example.com"). The output is NOT
3418+ NUL-terminated; the caller should append a NUL byte if needed.
3419+ If buf is NULL, the required buffer size is returned
3420+ in bufSz and LENGTH_ONLY_E is returned.
34123421
34133422 \param cert Pointer to the DecodedCert (must have been parsed).
34143423 \param buf Output buffer to receive the issuer name string,
34153424 or NULL to query the required size.
34163425 \param bufSz Pointer to the buffer size. On input, the available
34173426 buffer size. On output, the number of bytes written
3418- or the required size if buf is NULL.
3427+ (excluding any NUL terminator) or the required size
3428+ if buf is NULL.
34193429
34203430 \return 0 on success.
34213431 \return LENGTH_ONLY_E when buf is NULL (bufSz contains required size).
0 commit comments