Mechanism for marking a compilation option as private #10147
Labels
api-break
This issue/PR breaks the API and must wait for a new major version
enhancement
size-s
Estimated task size: small (~2d)
Create a mechanism for marking a configuration option as private.
mbedtls_config.h
,crypto_config.h
or their alternatives and extensions (MBEDTLS_CONFIG_FILE
,MBEDTLS_USER_CONFIG_FILE
, etc.). Any attempt to test them is rejected with an#error
raised wheneverbuild_info.h
is enabled.-D
.adjust*.h
headers.MBEDTLS_ALLOW_REMOVED_FEATURES
orTF_PSA_CRYPTO_ALLOW_REMOVED_FEATURES
(as applicable) is enabled, then private options are allowed. These options are enabled in thefull
config, so it's ok to make an option private and default-off if our test coverage depends on it (e.g. removing an elliptic curve that is still used in test data).mbedtls_config.h
or X.509/TLS options incrypto_config.h
. However, there must not be any complaints if the same configuration is used for both.PSA_WANT_
private. (This may be done in a follow-up, but it's a good way to validate the new mechanism.)The goal is to reject incomplete migrations of configurations from Mbed TLS 3.x. In particular, if the user attempts to set a legacy crypto option because of an incomplete migration from a configuration without
MBEDTLS_PSA_CRYPTO_CONFIG
, this should be rejected.See “Strategy for removing a compilation option” in Mbed-TLS/TF-PSA-Crypto#145 (published soon) for further considerations.
The text was updated successfully, but these errors were encountered: