From 054deecb8a63eaf89ee3b6b6809ba6945770b279 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Mon, 2 Sep 2019 13:47:00 +0100 Subject: [PATCH] check_config.h: Add dep'n of ECC per-curve options on MBEDTLS_ECP_C --- include/mbedtls/check_config.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/mbedtls/check_config.h b/include/mbedtls/check_config.h index b202dddde..e2c04af19 100644 --- a/include/mbedtls/check_config.h +++ b/include/mbedtls/check_config.h @@ -173,6 +173,21 @@ #error "MBEDTLS_ECP_C defined, but not all prerequisites" #endif +#if ( defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) || \ + defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) || \ + defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) || \ + defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) || \ + defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) || \ + defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) || \ + defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) || \ + defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) || \ + defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) || \ + defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) || \ + defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) ) && \ + !defined(MBEDTLS_ECP_C) +#error "At least one ECP curve enabled, but not all prerequesites" +#endif + #if defined(MBEDTLS_PK_PARSE_C) && !defined(MBEDTLS_ASN1_PARSE_C) #error "MBEDTLS_PK_PARSE_C defined, but not all prerequesites" #endif