build_info.h: change location of including config_psa.h

In build_info.h, some macros are defined based on PSA_WANT_XXX symbol.
This commit tweaks the location of including config_psa.h
so that macros in build_info.h could imply config options correctly.

Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
Yanray Wang 2023-05-17 12:41:25 +08:00
parent ff7a346201
commit 6397673cb8

View file

@ -87,6 +87,12 @@
#define MBEDTLS_MD_C #define MBEDTLS_MD_C
#endif #endif
/* PSA crypto specific configuration options */
#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
/* Auto-enable MBEDTLS_MD_LIGHT based on MBEDTLS_MD_C. /* Auto-enable MBEDTLS_MD_LIGHT based on MBEDTLS_MD_C.
* This allows checking for MD_LIGHT rather than MD_LIGHT || MD_C. * This allows checking for MD_LIGHT rather than MD_LIGHT || MD_C.
*/ */
@ -185,11 +191,6 @@
/* Make sure all configuration symbols are set before including check_config.h, /* Make sure all configuration symbols are set before including check_config.h,
* even the ones that are calculated programmatically. */ * 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
#include "mbedtls/check_config.h" #include "mbedtls/check_config.h"
#endif /* MBEDTLS_BUILD_INFO_H */ #endif /* MBEDTLS_BUILD_INFO_H */