From c5121ed11e928d7fb95dfb71f813efb1886e2722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 23 Feb 2026 11:04:23 +0100 Subject: [PATCH] PK: only use PSA macros when the header has been included... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- library/pk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/pk.c b/library/pk.c index 6b8240a304..88eee3c515 100644 --- a/library/pk.c +++ b/library/pk.c @@ -39,6 +39,7 @@ #include "mbedtls/platform.h" // for calloc/free #endif +#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) #define MBEDTLS_PK_MAX_EC_PUBKEY_RAW_LEN \ PSA_KEY_EXPORT_ECC_PUBLIC_KEY_MAX_SIZE(PSA_VENDOR_ECC_MAX_CURVE_BITS) @@ -58,6 +59,7 @@ #undef MBEDTLS_PK_MAX_PUBKEY_RAW_LEN #define MBEDTLS_PK_MAX_PUBKEY_RAW_LEN MBEDTLS_PK_MAX_RSA_PUBKEY_RAW_LEN #endif +#endif /* MBEDTLS_PSA_CRYPTO_CLIENT */ /* * Initialise a mbedtls_pk_context