blob: a3deae31526a1972158c5e1d061edc089429c239 [file] [log] [blame]
Gilles Peskine018e0982025-07-09 16:16:45 +02001/*
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 Peskine24d058b2025-04-25 18:30:35 +02009/* 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 Peskine018e0982025-07-09 16:16:45 +020027#include <mbedtls/build_info.h>
Gilles Peskineac637ac2025-07-22 21:54:31 +020028
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 Peskine24d058b2025-04-25 18:30:35 +020031/* Manually written checks */
Gilles Peskineac637ac2025-07-22 21:54:31 +020032#include "mbedtls_check_config.h"
Gilles Peskine24d058b2025-04-25 18:30:35 +020033/* Automatically generated checks */
34#include "mbedtls_config_check_final.h"