diff --git a/scripts/generate_config_tests.py b/scripts/generate_config_tests.py index 3f6a77abb..3a9e1a5be 100755 --- a/scripts/generate_config_tests.py +++ b/scripts/generate_config_tests.py @@ -69,8 +69,8 @@ if build_tree.is_mbedtls_3_6(): SIMPLE_DEPENDENCIES['MBEDTLS_NO_PLATFORM_ENTROPY'] = 'MBEDTLS_ENTROPY_C' BUILTIN_MODULE_ENABLEMENT_MACROS = [ - 'MBEDTLS_AES_C', 'MBEDTLS_CAMELLIA_C', 'MBEDTLS_CIPHER_C', 'MBEDTLS_GCM_C', - 'MBEDTLS_ECDH_C', 'MBEDTLS_ECDSA_C', 'MBEDTLS_ECP_C', + 'MBEDTLS_AES_C', 'MBEDTLS_CAMELLIA_C', 'MBEDTLS_GCM_C', + 'MBEDTLS_ECP_C', 'MBEDTLS_RSA_C', 'MBEDTLS_SHA256_C', 'MBEDTLS_SHA512_C', ] @@ -116,6 +116,13 @@ def dependencies_of_setting(cfg: config_common.Config, return 'MBEDTLS_SSL_CLI_C:MBEDTLS_SSL_SRV_C:MBEDTLS_SSL_PROTO_DTLS' if name.startswith('MBEDTLS_SSL_'): return 'MBEDTLS_SSL_CLI_C:MBEDTLS_SSL_SRV_C' + if name == 'MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED' and \ + not build_tree.is_mbedtls_3_6(): + # In 1.x the module ecdh.c is removed. This option remains, with its + # historical name for compatibility. It is still only relevant when + # the built-in implementation of ECDH is enabled, but this condition + # is no longer expressed as MBEDTLS_ECDH_C. + return 'MBEDTLS_PSA_BUILTIN_ALG_ECDH' for pos in re.finditer(r'_', name): super_name = name[:pos.start()] + '_C' if cfg.known(super_name):