From c45d9ac4c2b6affb87e5128f04c4bcba15ca2b6d Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 19 Sep 2025 22:17:05 +0200 Subject: [PATCH] Allow setting removed options that are now always on Signed-off-by: Gilles Peskine --- scripts/generate_config_checks.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/generate_config_checks.py b/scripts/generate_config_checks.py index a2a174bb4c..bae93c3662 100755 --- a/scripts/generate_config_checks.py +++ b/scripts/generate_config_checks.py @@ -16,6 +16,11 @@ class CryptoInternal(SubprojectInternal): class CryptoOption(SubprojectOption): SUBPROJECT = 'psa/crypto_config.h' +ALWAYS_ENABLED_SINCE_4_0 = frozenset([ + 'MBEDTLS_PSA_CRYPTO_CONFIG', + 'MBEDTLS_USE_PSA_CRYPTO', +]) + def checkers_for_removed_options() -> Iterator[Checker]: """Discover removed options. Yield corresponding checkers.""" history = config_history.ConfigHistory() @@ -24,6 +29,8 @@ def checkers_for_removed_options() -> Iterator[Checker]: crypto_public = history.options('tfpsacrypto', '1.0') crypto_internal = history.internal('tfpsacrypto', '1.0') for option in sorted(old_public - new_public): + if option in ALWAYS_ENABLED_SINCE_4_0: + continue if option in crypto_public: yield CryptoOption(option) elif option in crypto_internal: