From 483fd66d21752302f19db54812f213e7e8737044 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Mon, 2 Sep 2019 12:39:24 +0100 Subject: [PATCH] Fixup: Don't reference legacy ECP curve identifier in check_config.h --- include/mbedtls/check_config.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/include/mbedtls/check_config.h b/include/mbedtls/check_config.h index f28345d2f..504b3539a 100644 --- a/include/mbedtls/check_config.h +++ b/include/mbedtls/check_config.h @@ -87,9 +87,12 @@ #error "MBEDTLS_CMAC_C defined, but not all prerequisites" #endif -#if defined(MBEDTLS_SSL_CONF_SINGLE_EC) && \ - ( !defined(MBEDTLS_SSL_CONF_SINGLE_EC_TLS_ID) || \ - !defined(MBEDTLS_SSL_CONF_SINGLE_EC_GRP_ID) ) +#if defined(MBEDTLS_SSL_CONF_SINGLE_EC) && \ + ( !defined(MBEDTLS_SSL_CONF_SINGLE_EC_TLS_ID) || \ + ( defined(MBEDTLS_USE_TINYCRYPT) && \ + !defined(MBEDTLS_SSL_CONF_SINGLE_UECC_GRP_ID) ) || \ + ( defined(MBEDTLS_ECP_C) && \ + !defined(MBEDTLS_SSL_CONF_SINGLE_EC_GRP_ID) ) ) #error "MBEDTLS_SSL_CONF_SINGLE_EC defined, but not all prerequesites" #endif @@ -103,11 +106,11 @@ #error "MBEDTLS_USE_TINYCRYPT defined, but it cannot be defined with MBEDTLS_NO_64BIT_MULTIPLICATION" #endif -#if defined(MBEDTLS_USE_TINYCRYPT) && \ - !( defined(MBEDTLS_SSL_CONF_SINGLE_EC) && \ - MBEDTLS_SSL_CONF_SINGLE_EC_TLS_ID == 23 && \ - MBEDTLS_SSL_CONF_SINGLE_EC_GRP_ID == MBEDTLS_ECP_DP_SECP256R1 ) -#error "MBEDTLS_USE_TINYCRYPT requires the use of MBEDTLS_SSL_CONF_SINGLE_EC to hardcode the choice of Secp256r1" +#if defined(MBEDTLS_USE_TINYCRYPT) && \ + !( defined(MBEDTLS_SSL_CONF_SINGLE_EC) && \ + MBEDTLS_SSL_CONF_SINGLE_EC_TLS_ID == 23 && \ + MBEDTLS_SSL_CONF_SINGLE_UECC_GRP_ID == MBEDTLS_UECC_DP_SECP256R1 ) +#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) && \