From b38e28dbf00b72303781020580e4e7fbfe1ec21c Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 4 Mar 2026 11:54:35 +0100 Subject: [PATCH] Make sure we declare TF-PSA-Crypto platform requirements before including system headers Signed-off-by: Gilles Peskine --- library/mbedtls_common.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/mbedtls_common.h b/library/mbedtls_common.h index 43dac8266b..188ae4692b 100644 --- a/library/mbedtls_common.h +++ b/library/mbedtls_common.h @@ -33,6 +33,14 @@ */ #include "mbedtls_platform_requirements.h" +/* Mbed TLS is tightly coupled with TF-PSA-Crypto, and inherits all of + * its platform requirements because we don't have a clear separation of + * public vs private platform interfaces. So make sure we declare the + * TF-PSA-Crypto platform requirements. We need to do that before including + * any system headers, thus before including the user config file since it + * may include platform headers. */ +#include "tf_psa_crypto_platform_requirements.h" + /* From this point onwards, ensure we have the library configuration and * the configuration-derived macros. */ #include