From cc45cd177f89883ff54f1c54bbfc8f03a7cf8ef6 Mon Sep 17 00:00:00 2001 From: Ron Eldor Date: Wed, 15 May 2019 10:20:09 +0300 Subject: [PATCH] Update SAN parsing documentation 1) Fix typo in `mbedtls_x509_parse_subject_alt_name()` documentation. 2) Add a not in `mbedtls_x509_parse_subject_alt_name()` documentation, stating that the lifetime of the target structure is restricted by the lifetime ofthe parsed certificate. --- include/mbedtls/x509_crt.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/mbedtls/x509_crt.h b/include/mbedtls/x509_crt.h index 81a2de2be..a5deb95e0 100644 --- a/include/mbedtls/x509_crt.h +++ b/include/mbedtls/x509_crt.h @@ -410,11 +410,15 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path ); * as defined in RFC 4180 is supported. * * \note This function should be called on a single raw data of - * subject alternative name. For example, after successfult + * subject alternative name. For example, after successful * certificate parsing, one must iterate on every item in the * \p crt->subject_alt_names sequence, and send it as parameter * to this function. * + * \note The target structure contains pointers to the raw data of the + * parsed certificate, and its lifetime is restricted by the + * lifetime of the certificate. + * * \return \c 0 on success * \return #MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE for an unsupported * SAN type