From 61b05e572bd4b5cf398f8a2724ede7314e78afce Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Fri, 23 Aug 2019 15:24:34 +0100 Subject: [PATCH] Remove dependency of MBEDTLS_X509_USE_C on MBEDTLS_BIGNUM_C There is no apparent direct dependency, and the indirect dependency through the RSA and legacy ECP modules is already encoded in the chain MBEDTLS_X509_USE_C -> MBEDTLS_PK_PARSE_C -> MBEDTLS_PK_C -> MBEDTLS_RSA_C || MBEDTLS_ECP_C -> MBEDTLS_BIGNUM_C which will be modified to MBEDTLS_X509_USE_C -> MBEDTLS_PK_PARSE_C -> MBEDTLS_PK_C -> MBEDTLS_RSA_C || MBEDTLS_ECP_C || MBEDTLS_USE_TINYCRYPT in which case MBEDTLS_BIGNUM_C is not needed for MBEDTLS_X509_USE_C if only MBEDTLS_USE_TINYCRYPT is set, but not MBEDTLS_RSA_C or MBEDTLS_ECP_C. --- include/mbedtls/check_config.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/mbedtls/check_config.h b/include/mbedtls/check_config.h index 3ed61edea..b202dddde 100644 --- a/include/mbedtls/check_config.h +++ b/include/mbedtls/check_config.h @@ -785,9 +785,10 @@ #error "MBEDTLS_VERSION_FEATURES defined, but not all prerequisites" #endif -#if defined(MBEDTLS_X509_USE_C) && ( !defined(MBEDTLS_BIGNUM_C) || \ - !defined(MBEDTLS_OID_C) || !defined(MBEDTLS_ASN1_PARSE_C) || \ - !defined(MBEDTLS_PK_PARSE_C) ) +#if defined(MBEDTLS_X509_USE_C) && \ + ( !defined(MBEDTLS_OID_C) || \ + !defined(MBEDTLS_ASN1_PARSE_C) || \ + !defined(MBEDTLS_PK_PARSE_C) ) #error "MBEDTLS_X509_USE_C defined, but not all prerequisites" #endif