From 3dc7f238e62ef697b0a697a1bbec6bdca38586e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 6 Dec 2022 13:20:06 +0100 Subject: [PATCH] Document that ECP_RESTARTABLE depends on ECP_C MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is not new, it had always been the case, just not documented. Pointed out by depends.py pkalgs (again, now that restartable is part of full). Signed-off-by: Manuel Pégourié-Gonnard --- include/mbedtls/check_config.h | 5 +++++ include/mbedtls/config.h | 2 ++ tests/scripts/depends.py | 1 + 3 files changed, 8 insertions(+) diff --git a/include/mbedtls/check_config.h b/include/mbedtls/check_config.h index 7ae1ff94db..25df257a94 100644 --- a/include/mbedtls/check_config.h +++ b/include/mbedtls/check_config.h @@ -143,6 +143,11 @@ #error "MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED defined, but MBEDTLS_ECDH_LEGACY_CONTEXT not disabled" #endif +#if defined(MBEDTLS_ECP_RESTARTABLE) && \ + !defined(MBEDTLS_ECP_C) +#error "MBEDTLS_ECP_RESTARTABLE defined, but not all prerequisites" +#endif + #if defined(MBEDTLS_ECDSA_DETERMINISTIC) && !defined(MBEDTLS_HMAC_DRBG_C) #error "MBEDTLS_ECDSA_DETERMINISTIC defined, but not all prerequisites" #endif diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h index dff4522574..f6d2c612b7 100644 --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h @@ -885,6 +885,8 @@ * MBEDTLS_ECP_ALT, MBEDTLS_ECDH_XXX_ALT, MBEDTLS_ECDSA_XXX_ALT, * MBEDTLS_ECDH_LEGACY_CONTEXT, and MBEDTLS_USE_PSA_CRYPTO. * + * Requires: MBEDTLS_ECP_C + * * Uncomment this macro to enable restartable ECC computations. */ //#define MBEDTLS_ECP_RESTARTABLE diff --git a/tests/scripts/depends.py b/tests/scripts/depends.py index 2c38f9d705..ed9caa41de 100755 --- a/tests/scripts/depends.py +++ b/tests/scripts/depends.py @@ -229,6 +229,7 @@ REVERSE_DEPENDENCIES = { 'MBEDTLS_ECP_C': ['MBEDTLS_ECDSA_C', 'MBEDTLS_ECDH_C', 'MBEDTLS_ECJPAKE_C', + 'MBEDTLS_ECP_RESTARTABLE', 'MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED', 'MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED', 'MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED',