mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Merge pull request #6900 from AndrzejKurek/san-dirname
Add support for directoryName subjectAltName
This commit is contained in:
@ -294,7 +294,8 @@ typedef struct mbedtls_x509_subject_alternative_name {
|
||||
int type; /**< The SAN type, value of MBEDTLS_X509_SAN_XXX. */
|
||||
union {
|
||||
mbedtls_x509_san_other_name other_name; /**< The otherName supported type. */
|
||||
mbedtls_x509_buf unstructured_name; /**< The buffer for the unconstructed types. Only rfc822Name, dnsName and uniformResourceIdentifier are currently supported */
|
||||
mbedtls_x509_name directory_name;
|
||||
mbedtls_x509_buf unstructured_name; /**< The buffer for the unstructured types. rfc822Name, dnsName and uniformResourceIdentifier are currently supported. */
|
||||
}
|
||||
san; /**< A union of the supported SAN types */
|
||||
}
|
||||
@ -378,7 +379,10 @@ int mbedtls_x509_time_is_future(const mbedtls_x509_time *from);
|
||||
|
||||
/**
|
||||
* \brief This function parses an item in the SubjectAlternativeNames
|
||||
* extension.
|
||||
* extension. Please note that this function might allocate
|
||||
* additional memory for a subject alternative name, thus
|
||||
* mbedtls_x509_free_subject_alt_name has to be called
|
||||
* to dispose of this additional memory afterwards.
|
||||
*
|
||||
* \param san_buf The buffer holding the raw data item of the subject
|
||||
* alternative name.
|
||||
@ -406,6 +410,12 @@ int mbedtls_x509_time_is_future(const mbedtls_x509_time *from);
|
||||
*/
|
||||
int mbedtls_x509_parse_subject_alt_name(const mbedtls_x509_buf *san_buf,
|
||||
mbedtls_x509_subject_alternative_name *san);
|
||||
/**
|
||||
* \brief Unallocate all data related to subject alternative name
|
||||
*
|
||||
* \param san SAN structure - extra memory owned by this structure will be freed
|
||||
*/
|
||||
void mbedtls_x509_free_subject_alt_name(mbedtls_x509_subject_alternative_name *san);
|
||||
|
||||
/** \} addtogroup x509_module */
|
||||
|
||||
|
@ -75,7 +75,7 @@ typedef struct mbedtls_x509_crt {
|
||||
mbedtls_x509_buf issuer_id; /**< Optional X.509 v2/v3 issuer unique identifier. */
|
||||
mbedtls_x509_buf subject_id; /**< Optional X.509 v2/v3 subject unique identifier. */
|
||||
mbedtls_x509_buf v3_ext; /**< Optional X.509 v3 extensions. */
|
||||
mbedtls_x509_sequence subject_alt_names; /**< Optional list of raw entries of Subject Alternative Names extension (currently only dNSName, uniformResourceIdentifier and OtherName are listed). */
|
||||
mbedtls_x509_sequence subject_alt_names; /**< Optional list of raw entries of Subject Alternative Names extension (currently only dNSName, uniformResourceIdentifier, DirectoryName and OtherName are listed). */
|
||||
|
||||
mbedtls_x509_sequence certificate_policies; /**< Optional list of certificate policies (Only anyPolicy is printed and enforced, however the rest of the policies are still listed). */
|
||||
|
||||
|
Reference in New Issue
Block a user