From 8f4eacaac6a7f2b6345ad11c0cba375c9d38eb96 Mon Sep 17 00:00:00 2001 From: Thomas Daubney Date: Thu, 27 May 2021 13:45:38 +0100 Subject: [PATCH] Removes MBEDTLS_ECDH_LEGACY_CONTEXT from config.h Commit removes the definition of MBEDTLS_ECDH_LEGACY_CONTEXT from config.h. Additionally removes the unset calls to MBEDTLS_ECDH_LEGACY_CONTEXT in all.sh. Signed-off-by: Thomas Daubney --- include/mbedtls/config.h | 28 ---------------------------- tests/scripts/all.sh | 4 ---- 2 files changed, 32 deletions(-) diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h index 715c73ada0..c6882dbb27 100644 --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h @@ -784,34 +784,6 @@ */ //#define MBEDTLS_ECP_RESTARTABLE -/** - * \def MBEDTLS_ECDH_LEGACY_CONTEXT - * - * Use a backward compatible ECDH context. - * - * Mbed TLS supports two formats for ECDH contexts (#mbedtls_ecdh_context - * defined in `ecdh.h`). For most applications, the choice of format makes - * no difference, since all library functions can work with either format, - * except that the new format is incompatible with MBEDTLS_ECP_RESTARTABLE. - - * The new format used when this option is disabled is smaller - * (56 bytes on a 32-bit platform). In future versions of the library, it - * will support alternative implementations of ECDH operations. - * The new format is incompatible with applications that access - * context fields directly and with restartable ECP operations. - * - * Define this macro if you enable MBEDTLS_ECP_RESTARTABLE or if you - * want to access ECDH context fields directly. Otherwise you should - * comment out this macro definition. - * - * This option has no effect if #MBEDTLS_ECDH_C is not enabled. - * - * \note This configuration option is experimental. Future versions of the - * library may modify the way the ECDH context layout is configured - * and may modify the layout of the new context type. - */ -#define MBEDTLS_ECDH_LEGACY_CONTEXT - /** * \def MBEDTLS_ECDSA_DETERMINISTIC * diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index ef2b6363bb..aff186b1d8 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -1078,7 +1078,6 @@ component_test_ecp_restartable_no_internal_rng () { component_test_new_ecdh_context () { msg "build: new ECDH context (ASan build)" # ~ 6 min - scripts/config.py unset MBEDTLS_ECDH_LEGACY_CONTEXT CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan . make @@ -1095,7 +1094,6 @@ component_test_new_ecdh_context () { component_test_everest () { msg "build: Everest ECDH context (ASan build)" # ~ 6 min - scripts/config.py unset MBEDTLS_ECDH_LEGACY_CONTEXT scripts/config.py set MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED CC=clang cmake -D CMAKE_BUILD_TYPE:String=Asan . make @@ -1113,7 +1111,6 @@ component_test_everest () { component_test_everest_curve25519_only () { msg "build: Everest ECDH context, only Curve25519" # ~ 6 min - scripts/config.py unset MBEDTLS_ECDH_LEGACY_CONTEXT scripts/config.py set MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED scripts/config.py unset MBEDTLS_ECDSA_C scripts/config.py unset MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED @@ -2317,7 +2314,6 @@ support_test_m32_o1 () { component_test_m32_everest () { msg "build: i386, Everest ECDH context (ASan build)" # ~ 6 min - scripts/config.py unset MBEDTLS_ECDH_LEGACY_CONTEXT scripts/config.py set MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED make CC=gcc CFLAGS="$ASAN_CFLAGS -m32 -O2" LDFLAGS="-m32 $ASAN_CFLAGS"