Skip to content

Commit f1161e9

Browse files
committed
Remove MBEDTLS_X509_REMOVE_INFO Macro
This commit remove an MbedTLS specific macro MBEDTLS_X509_REMOVE_INFO as it is not defined by TF-PSA-Crypto. Signed-off-by: Harry Ramsey <[email protected]>
1 parent 1b36736 commit f1161e9

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

drivers/builtin/include/mbedtls/oid.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ extern "C" {
476476
typedef struct mbedtls_oid_descriptor_t {
477477
const char *MBEDTLS_PRIVATE(asn1); /*!< OID ASN.1 representation */
478478
size_t MBEDTLS_PRIVATE(asn1_len); /*!< length of asn1 */
479-
#if !defined(MBEDTLS_X509_REMOVE_INFO)
479+
#if 1 /* OID_INFO_STRINGS */
480480
const char *MBEDTLS_PRIVATE(name); /*!< official name (e.g. from RFC) */
481481
const char *MBEDTLS_PRIVATE(description); /*!< human friendly description */
482482
#endif
@@ -628,7 +628,7 @@ int mbedtls_oid_get_md_hmac(const mbedtls_asn1_buf *oid, mbedtls_md_type_t *md_h
628628
*/
629629
int mbedtls_oid_get_md_alg(const mbedtls_asn1_buf *oid, mbedtls_md_type_t *md_alg);
630630

631-
#if !defined(MBEDTLS_X509_REMOVE_INFO)
631+
#if 1 /* OID_INFO_STRINGS */
632632
/**
633633
* \brief Translate Extended Key Usage OID into description
634634
*
@@ -638,7 +638,7 @@ int mbedtls_oid_get_md_alg(const mbedtls_asn1_buf *oid, mbedtls_md_type_t *md_al
638638
* \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
639639
*/
640640
int mbedtls_oid_get_extended_key_usage(const mbedtls_asn1_buf *oid, const char **desc);
641-
#endif
641+
#endif /* OID_INFO_STRINGS */
642642

643643
/**
644644
* \brief Translate certificate policies OID into description

drivers/builtin/src/oid.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
/*
3030
* Macro to generate mbedtls_oid_descriptor_t
3131
*/
32-
#if !defined(MBEDTLS_X509_REMOVE_INFO)
32+
#if 1 /* OID_INFO_STRINGS */
3333
#define OID_DESCRIPTOR(s, name, description) { ADD_LEN(s), name, description }
3434
#define NULL_OID_DESCRIPTOR { NULL, 0, NULL, NULL }
3535
#else
3636
#define OID_DESCRIPTOR(s, name, description) { ADD_LEN(s) }
3737
#define NULL_OID_DESCRIPTOR { NULL, 0 }
38-
#endif
38+
#endif /* OID_INFO_STRINGS */
3939

4040
/*
4141
* Macro to generate an internal function for oid_XXX_from_asn1() (used by
@@ -60,7 +60,7 @@
6060
return NULL; \
6161
}
6262

63-
#if !defined(MBEDTLS_X509_REMOVE_INFO)
63+
#if 1 /* OID_INFO_STRINGS */
6464
/*
6565
* Macro to generate a function for retrieving a single attribute from the
6666
* descriptor of an mbedtls_oid_descriptor_t wrapper.
@@ -73,7 +73,7 @@
7373
*ATTR1 = data->descriptor.ATTR1; \
7474
return 0; \
7575
}
76-
#endif /* MBEDTLS_X509_REMOVE_INFO */
76+
#endif /* OID_INFO_STRINGS */
7777

7878
/*
7979
* Macro to generate a function for retrieving a single attribute from an
@@ -327,7 +327,7 @@ static const oid_x509_ext_t oid_x509_ext[] =
327327
FN_OID_TYPED_FROM_ASN1(oid_x509_ext_t, x509_ext, oid_x509_ext)
328328
FN_OID_GET_ATTR1(mbedtls_oid_get_x509_ext_type, oid_x509_ext_t, x509_ext, int, ext_type)
329329

330-
#if !defined(MBEDTLS_X509_REMOVE_INFO)
330+
#if 1 /* OID_INFO_STRINGS */
331331
static const mbedtls_oid_descriptor_t oid_ext_key_usage[] =
332332
{
333333
OID_DESCRIPTOR(MBEDTLS_OID_SERVER_AUTH,
@@ -365,7 +365,7 @@ FN_OID_GET_ATTR1(mbedtls_oid_get_certificate_policies,
365365
certificate_policies,
366366
const char *,
367367
description)
368-
#endif /* MBEDTLS_X509_REMOVE_INFO */
368+
#endif /* OID_INFO_STRINGS */
369369

370370
/*
371371
* For SignatureAlgorithmIdentifier
@@ -472,13 +472,13 @@ static const oid_sig_alg_t oid_sig_alg[] =
472472

473473
FN_OID_TYPED_FROM_ASN1(oid_sig_alg_t, sig_alg, oid_sig_alg)
474474

475-
#if !defined(MBEDTLS_X509_REMOVE_INFO)
475+
#if 1 /* OID_INFO_STRINGS */
476476
FN_OID_GET_DESCRIPTOR_ATTR1(mbedtls_oid_get_sig_alg_desc,
477477
oid_sig_alg_t,
478478
sig_alg,
479479
const char *,
480480
description)
481-
#endif
481+
#endif /* OID_INFO_STRINGS */
482482

483483
FN_OID_GET_ATTR2(mbedtls_oid_get_sig_alg,
484484
oid_sig_alg_t,

tests/suites/test_suite_oid.function

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* END_HEADER */
77

88
/* BEGIN_DEPENDENCIES
9-
* depends_on:MBEDTLS_OID_C:!MBEDTLS_X509_REMOVE_INFO
9+
* depends_on:MBEDTLS_OID_C
1010
* END_DEPENDENCIES
1111
*/
1212

0 commit comments

Comments
 (0)