From a06787a6296dc06fba04631fc4a52d5a87ccb1f9 Mon Sep 17 00:00:00 2001 From: Przemek Stekiel Date: Fri, 2 Sep 2022 14:41:44 +0200 Subject: [PATCH] build_info.h: include config_psa.h also when MBEDTLS_PSA_CRYPTO_C This is done to have PSA_WANT_xxx symbols available in check_config.h when MBEDTLS_PSA_CRYPTO_C. Signed-off-by: Przemek Stekiel --- include/mbedtls/build_info.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/mbedtls/build_info.h b/include/mbedtls/build_info.h index 234debd01..6195ac979 100644 --- a/include/mbedtls/build_info.h +++ b/include/mbedtls/build_info.h @@ -77,7 +77,11 @@ #if defined(MBEDTLS_PK_C) && defined(MBEDTLS_USE_PSA_CRYPTO) #define MBEDTLS_PK_WRITE_C #endif -#if defined(MBEDTLS_PSA_CRYPTO_CONFIG) + +/* Make sure all configuration symbols are set before including check_config.h, + * even the ones that are calculated programmatically. */ +#if defined(MBEDTLS_PSA_CRYPTO_CONFIG) /* PSA_WANT_xxx influences MBEDTLS_xxx */ || \ + defined(MBEDTLS_PSA_CRYPTO_C) /* MBEDTLS_xxx influences PSA_WANT_xxx */ #include "mbedtls/config_psa.h" #endif