From f05f594acbd405104150f47b349e423cc1ba0241 Mon Sep 17 00:00:00 2001 From: Ron Eldor Date: Mon, 13 May 2019 19:11:31 +0300 Subject: [PATCH] change the type of hardware_module_name member Change the type of `hardware_module_name` struct from `mbedtls_x509_name` to a unique struct, to distinguish it from the named data type. --- include/mbedtls/x509_crt.h | 7 ++++++- library/x509_crt.c | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/mbedtls/x509_crt.h b/include/mbedtls/x509_crt.h index b321c4233c..81a2de2be2 100644 --- a/include/mbedtls/x509_crt.h +++ b/include/mbedtls/x509_crt.h @@ -121,7 +121,12 @@ typedef struct mbedtls_x509_san_other_name * hwType OBJECT IDENTIFIER, * hwSerialNum OCTET STRING } */ - mbedtls_x509_name hardware_module_name; + struct + { + mbedtls_x509_buf oid; /**< The object identifier. */ + mbedtls_x509_buf val; /**< The named value. */ + } + hardware_module_name; } value; } diff --git a/library/x509_crt.c b/library/x509_crt.c index cce230bd26..9bc8696523 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -1668,8 +1668,6 @@ static int x509_get_other_name( const mbedtls_x509_buf *subject_alt_name, other_name->value.hardware_module_name.val.tag = MBEDTLS_ASN1_OCTET_STRING; other_name->value.hardware_module_name.val.p = p; other_name->value.hardware_module_name.val.len = len; - other_name->value.hardware_module_name.next = NULL; - other_name->value.hardware_module_name.next_merged = 0; p += len; if( p != end ) {