diff options
author | Gilles Peskine <Gilles.Peskine@arm.com> | 2024-05-16 14:44:15 +0200 |
---|---|---|
committer | Gilles Peskine <Gilles.Peskine@arm.com> | 2024-05-29 09:44:20 +0200 |
commit | d33eb55cce2f6f8110f6e23fe6fb31e23e67fa2f (patch) | |
tree | 9645a0e3779ddcb0f52019a7f3269fb9416f148d /include | |
parent | fef877f51f562acd23ed46c1cb70b783c13432f3 (diff) | |
download | mbedtls-d33eb55cce2f6f8110f6e23fe6fb31e23e67fa2f.zip mbedtls-d33eb55cce2f6f8110f6e23fe6fb31e23e67fa2f.tar.gz mbedtls-d33eb55cce2f6f8110f6e23fe6fb31e23e67fa2f.tar.bz2 |
Macros to indicate the finalization level of the configuration
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/mbedtls/build_info.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/mbedtls/build_info.h b/include/mbedtls/build_info.h index eab167f..e13e236 100644 --- a/include/mbedtls/build_info.h +++ b/include/mbedtls/build_info.h @@ -101,6 +101,9 @@ #define inline __inline #endif +#undef MBEDTLS_CONFIG_FILES_READ +#undef MBEDTLS_CONFIG_IS_FINALIZED + /* X.509, TLS and non-PSA crypto configuration */ #if !defined(MBEDTLS_CONFIG_FILE) #include "mbedtls/mbedtls_config.h" @@ -135,6 +138,12 @@ #endif #endif /* defined(MBEDTLS_PSA_CRYPTO_CONFIG) */ +/* Indicate that all configuration files have been read. + * It is now time to adjust the configuration (follow through on dependencies, + * make PSA and legacy crypto consistent, etc.). + */ +#define MBEDTLS_CONFIG_FILES_READ + /* Auto-enable MBEDTLS_CTR_DRBG_USE_128_BIT_KEY if * MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH and MBEDTLS_CTR_DRBG_C defined * to ensure a 128-bit key size in CTR_DRBG. @@ -169,8 +178,13 @@ #include "mbedtls/config_adjust_ssl.h" -/* Make sure all configuration symbols are set before including check_config.h, - * even the ones that are calculated programmatically. */ +/* Indicate that all configuration symbols are set, + * even the ones that are calculated programmatically. + * It is now safe to query the configuration (to check it, to size buffers, + * etc.). + */ +#define MBEDTLS_CONFIG_IS_FINALIZED + #include "mbedtls/check_config.h" #endif /* MBEDTLS_BUILD_INFO_H */ |