diff --git a/include/mbedtls/build_info.h b/include/mbedtls/build_info.h index ec0dc8afe7..cb9582ce78 100644 --- a/include/mbedtls/build_info.h +++ b/include/mbedtls/build_info.h @@ -132,7 +132,7 @@ /* MBEDTLS_ECP_C now consists of MBEDTLS_ECP_LIGHT plus functions for curve * arithmetic. As a consequence if MBEDTLS_ECP_C is required for some reason, * then MBEDTLS_ECP_LIGHT should be enabled as well. */ -#if defined(MBEDTLS_ECP_C) +#if defined(MBEDTLS_ECP_C) || defined(MBEDTLS_PK_PARSE_EC_EXTENDED) #define MBEDTLS_ECP_LIGHT #endif diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 9e2aa95ec7..983f31cc09 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -2450,6 +2450,9 @@ config_psa_crypto_no_ecp_at_all () { scripts/config.py unset MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED scripts/config.py unset MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED + # Disable all the features that auto-enable ECP_LIGHT (see build_info.h) + scripts/config.py unset MBEDTLS_PK_PARSE_EC_EXTENDED + # Restartable feature is not yet supported by PSA. Once it will in # the future, the following line could be removed (see issues # 6061, 6332 and following ones) diff --git a/tests/suites/test_suite_pkparse.data b/tests/suites/test_suite_pkparse.data index 098fd5a5d8..5080ea9bf5 100644 --- a/tests/suites/test_suite_pkparse.data +++ b/tests/suites/test_suite_pkparse.data @@ -1095,7 +1095,7 @@ depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_LIGHT:MBEDTLS_ECP_DP_BP512R1_ENABLED pk_parse_keyfile_ec:"data_files/ec_bp512_prv.comp.pem":"NULL":0 Parse EC Key #15 (SEC1 DER, secp256k1, SpecifiedECDomain) -depends_on:MBEDTLS_ECP_LIGHT:MBEDTLS_ECP_DP_SECP256K1_ENABLED:MBEDTLS_PK_PARSE_EC_EXTENDED +depends_on:MBEDTLS_ECP_DP_SECP256K1_ENABLED:MBEDTLS_PK_PARSE_EC_EXTENDED pk_parse_keyfile_ec:"data_files/ec_prv.specdom.der":"NULL":0 Parse EC Key #16 (RFC 8410, DER, X25519)