Gilles Peskine | 018e098 | 2025-07-09 16:16:45 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Mbed TLS configuration checks |
| 3 | */ |
| 4 | /* |
| 5 | * Copyright The Mbed TLS Contributors |
| 6 | * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later |
| 7 | */ |
| 8 | |
Gilles Peskine | 24d058b | 2025-04-25 18:30:35 +0200 | [diff] [blame] | 9 | /* Apply the TF-PSA-Crypto configuration first. We need to do this |
| 10 | * before <mbedtls/build_info.h>, because "mbedtls_config_check_before.h" |
| 11 | * needs to run after the crypto config (including derived macros) is |
| 12 | * finalized, but before the user's mbedtls config is applied. This way |
| 13 | * it is possible to differentiate macros set by the user's mbedtls config |
| 14 | * from macros set or derived by the crypto config. */ |
| 15 | #include <tf-psa-crypto/build_info.h> |
| 16 | |
| 17 | /* Consistency checks on the user's configuration. |
| 18 | * Check that it doesn't define macros that we assume are under full |
| 19 | * control of the library, or options from past major versions that |
| 20 | * no longer have any effect. |
| 21 | * These headers are automatically generated. See |
| 22 | * framework/scripts/mbedtls_framework/config_checks_generator.py |
| 23 | */ |
| 24 | #include "mbedtls_config_check_before.h" |
| 25 | #define MBEDTLS_INCLUDE_AFTER_RAW_CONFIG "mbedtls_config_check_user.h" |
| 26 | |
Gilles Peskine | 018e098 | 2025-07-09 16:16:45 +0200 | [diff] [blame] | 27 | #include <mbedtls/build_info.h> |
Gilles Peskine | ac637ac | 2025-07-22 21:54:31 +0200 | [diff] [blame] | 28 | |
| 29 | /* Consistency checks in the configuration: check for incompatible options, |
| 30 | * missing options when at least one of a set needs to be enabled, etc. */ |
Gilles Peskine | 24d058b | 2025-04-25 18:30:35 +0200 | [diff] [blame] | 31 | /* Manually written checks */ |
Gilles Peskine | ac637ac | 2025-07-22 21:54:31 +0200 | [diff] [blame] | 32 | #include "mbedtls_check_config.h" |
Gilles Peskine | 24d058b | 2025-04-25 18:30:35 +0200 | [diff] [blame] | 33 | /* Automatically generated checks */ |
| 34 | #include "mbedtls_config_check_final.h" |