Only guard with CRYPTO_CLIENT when version >= 4

In 4.x the semantics of MBEDTLS_PSA_CRYPTO_C and
MBEDTLS_PSA_CRYPTO_CLIENT are different compared with 3.6.

Where this is a problem, make guards more version-specific so that we
are guarding with MBEDTLS_PSA_CRYPTO_C for 3.6 and
MBEDTLS_PSA_CRYPTO_CLIENT for 4.x, keeping each branch the same as it
was formerly.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
David Horstmann
2024-09-27 15:13:32 +01:00
parent 3ee3223d9f
commit dfd3075e32
2 changed files with 13 additions and 5 deletions

View File

@@ -13,7 +13,8 @@
#if ((MBEDTLS_VERSION_MAJOR < 4) \
&& defined(MBEDTLS_PSA_CRYPTO_C)) \
|| defined(MBEDTLS_PSA_CRYPTO_CLIENT)
|| (MBEDTLS_VERSION_MAJOR >= 4 \
&& defined(MBEDTLS_PSA_CRYPTO_CLIENT))
#include <mbedtls/asn1.h>
#include <psa/crypto.h>