From 52c52f3c2fcdf96ba63d92de1cbf4746523e4b06 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Mon, 2 Sep 2019 11:47:20 +0100 Subject: [PATCH] check_config: Forbid simultaenous use of TinyCrypt and legacy ECC --- include/mbedtls/check_config.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/mbedtls/check_config.h b/include/mbedtls/check_config.h index 504b3539a..33bd8ec39 100644 --- a/include/mbedtls/check_config.h +++ b/include/mbedtls/check_config.h @@ -113,6 +113,10 @@ #error "MBEDTLS_USE_TINYCRYPT requires the use of MBEDTLS_SSL_CONF_SINGLE_UECC_GRP_ID to hardcode the choice of Secp256r1" #endif +#if defined(MBEDTLS_USE_TINYCRYPT) && defined(MBEDTLS_ECP_C) +#error "MBEDTLS_USE_TINYCRYPT and MBEDTLS_ECP_C cannot be used simultaneously" +#endif + #if defined(MBEDTLS_USE_TINYCRYPT) && \ !defined(MBEDTLS_SSL_CONF_RNG) #error "MBEDTLS_USE_TINYCRYPT defined, but not all prerequesites"