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>
diff --git a/tests/src/psa_exercise_key.c b/tests/src/psa_exercise_key.c
index a496de0..5c821e2 100644
--- a/tests/src/psa_exercise_key.c
+++ b/tests/src/psa_exercise_key.c
@@ -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>