mbedtls_x509_parse_subject_alt_name() function
This function parses an item in the SubjectAlternativeNames extension. \warning The target structure contains pointers to the raw data of the parsed certificate, and its lifetime is restricted by the lifetime of the certificate.
Arguments
san_buf
The buffer holding the raw data item of the subject alternative name.
san
The target structure to populate with the parsed presentation of the subject alternative name encoded in \p san_buf.
Return value
\c 0 on success #MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE for an unsupported SAN type. Another negative value for any other failure.
Notes
Only "dnsName" and "otherName" of type hardware_module_name as defined in RFC 4180 is supported. This function should be called on a single raw data of subject alternative name. For example, after successful certificate parsing, one must iterate on every item in the \c crt->subject_alt_names sequence, and pass it to this function.