Document check-config.h and *adjust*.h as internal headers

Including *adjust*.h directly is likely to cause them to be applied at the
wrong time, resulting in an invalid or unintended configuration.

Including check_config.h at the wrong time is likely to cause spurious
errors.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2024-04-26 14:18:10 +02:00
parent c7569a8c4b
commit 975e74cb1f
10 changed files with 25 additions and 0 deletions

View File

@ -2,6 +2,13 @@
* \file check_config.h * \file check_config.h
* *
* \brief Consistency checks for configuration options * \brief Consistency checks for configuration options
*
* This is an internal header. Do not include it directly.
*
* This header is included automatically by all public Mbed TLS headers
* (via mbedtls/build_info.h). Do not include it directly in a configuration
* file such as mbedtls/mbedtls_config.h or #MBEDTLS_USER_CONFIG_FILE!
* It would run at the wrong time due to missing derived symbols.
*/ */
/* /*
* Copyright The Mbed TLS Contributors * Copyright The Mbed TLS Contributors

View File

@ -2,6 +2,8 @@
* \file mbedtls/config_adjust_legacy_crypto.h * \file mbedtls/config_adjust_legacy_crypto.h
* \brief Adjust legacy configuration configuration * \brief Adjust legacy configuration configuration
* *
* This is an internal header. Do not include it directly.
*
* Automatically enable certain dependencies. Generally, MBEDLTS_xxx * Automatically enable certain dependencies. Generally, MBEDLTS_xxx
* configurations need to be explicitly enabled by the user: enabling * configurations need to be explicitly enabled by the user: enabling
* MBEDTLS_xxx_A but not MBEDTLS_xxx_B when A requires B results in a * MBEDTLS_xxx_A but not MBEDTLS_xxx_B when A requires B results in a

View File

@ -2,6 +2,8 @@
* \file mbedtls/config_adjust_legacy_from_psa.h * \file mbedtls/config_adjust_legacy_from_psa.h
* \brief Adjust PSA configuration: activate legacy implementations * \brief Adjust PSA configuration: activate legacy implementations
* *
* This is an internal header. Do not include it directly.
*
* When MBEDTLS_PSA_CRYPTO_CONFIG is enabled, activate legacy implementations * When MBEDTLS_PSA_CRYPTO_CONFIG is enabled, activate legacy implementations
* of cryptographic mechanisms as needed to fulfill the needs of the PSA * of cryptographic mechanisms as needed to fulfill the needs of the PSA
* configuration. Generally speaking, we activate a legacy mechanism if * configuration. Generally speaking, we activate a legacy mechanism if

View File

@ -2,6 +2,8 @@
* \file mbedtls/config_adjust_psa_from_legacy.h * \file mbedtls/config_adjust_psa_from_legacy.h
* \brief Adjust PSA configuration: construct PSA configuration from legacy * \brief Adjust PSA configuration: construct PSA configuration from legacy
* *
* This is an internal header. Do not include it directly.
*
* When MBEDTLS_PSA_CRYPTO_CONFIG is disabled, we automatically enable * When MBEDTLS_PSA_CRYPTO_CONFIG is disabled, we automatically enable
* cryptographic mechanisms through the PSA interface when the corresponding * cryptographic mechanisms through the PSA interface when the corresponding
* legacy mechanism is enabled. In many cases, this just enables the PSA * legacy mechanism is enabled. In many cases, this just enables the PSA

View File

@ -2,6 +2,8 @@
* \file mbedtls/config_adjust_psa_superset_legacy.h * \file mbedtls/config_adjust_psa_superset_legacy.h
* \brief Adjust PSA configuration: automatic enablement from legacy * \brief Adjust PSA configuration: automatic enablement from legacy
* *
* This is an internal header. Do not include it directly.
*
* To simplify some edge cases, we automatically enable certain cryptographic * To simplify some edge cases, we automatically enable certain cryptographic
* mechanisms in the PSA API if they are enabled in the legacy API. The general * mechanisms in the PSA API if they are enabled in the legacy API. The general
* idea is that if legacy module M uses mechanism A internally, and A has * idea is that if legacy module M uses mechanism A internally, and A has

View File

@ -2,6 +2,8 @@
* \file mbedtls/config_adjust_ssl.h * \file mbedtls/config_adjust_ssl.h
* \brief Adjust TLS configuration * \brief Adjust TLS configuration
* *
* This is an internal header. Do not include it directly.
*
* Automatically enable certain dependencies. Generally, MBEDLTS_xxx * Automatically enable certain dependencies. Generally, MBEDLTS_xxx
* configurations need to be explicitly enabled by the user: enabling * configurations need to be explicitly enabled by the user: enabling
* MBEDTLS_xxx_A but not MBEDTLS_xxx_B when A requires B results in a * MBEDTLS_xxx_A but not MBEDTLS_xxx_B when A requires B results in a

View File

@ -2,6 +2,8 @@
* \file mbedtls/config_adjust_x509.h * \file mbedtls/config_adjust_x509.h
* \brief Adjust X.509 configuration * \brief Adjust X.509 configuration
* *
* This is an internal header. Do not include it directly.
*
* Automatically enable certain dependencies. Generally, MBEDLTS_xxx * Automatically enable certain dependencies. Generally, MBEDLTS_xxx
* configurations need to be explicitly enabled by the user: enabling * configurations need to be explicitly enabled by the user: enabling
* MBEDTLS_xxx_A but not MBEDTLS_xxx_B when A requires B results in a * MBEDTLS_xxx_A but not MBEDTLS_xxx_B when A requires B results in a

View File

@ -2,6 +2,8 @@
* \file psa/crypto_adjust_auto_enabled.h * \file psa/crypto_adjust_auto_enabled.h
* \brief Adjust PSA configuration: enable always-on features * \brief Adjust PSA configuration: enable always-on features
* *
* This is an internal header. Do not include it directly.
*
* Always enable certain features which require a negligible amount of code * Always enable certain features which require a negligible amount of code
* to implement, to avoid some edge cases in the configuration combinatorics. * to implement, to avoid some edge cases in the configuration combinatorics.
*/ */

View File

@ -2,6 +2,8 @@
* \file psa/crypto_adjust_config_key_pair_types.h * \file psa/crypto_adjust_config_key_pair_types.h
* \brief Adjust PSA configuration for key pair types. * \brief Adjust PSA configuration for key pair types.
* *
* This is an internal header. Do not include it directly.
*
* See docs/proposed/psa-conditional-inclusion-c.md. * See docs/proposed/psa-conditional-inclusion-c.md.
* - Support non-basic operations in a keypair type implicitly enables basic * - Support non-basic operations in a keypair type implicitly enables basic
* support for that keypair type. * support for that keypair type.

View File

@ -2,6 +2,8 @@
* \file psa/crypto_adjust_config_synonyms.h * \file psa/crypto_adjust_config_synonyms.h
* \brief Adjust PSA configuration: enable quasi-synonyms * \brief Adjust PSA configuration: enable quasi-synonyms
* *
* This is an internal header. Do not include it directly.
*
* When two features require almost the same code, we automatically enable * When two features require almost the same code, we automatically enable
* both when either one is requested, to reduce the combinatorics of * both when either one is requested, to reduce the combinatorics of
* possible configurations. * possible configurations.