From e1651360c02eae921e8484813712c80268b011bf Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Mon, 19 Jun 2023 14:19:44 +0200 Subject: [PATCH] pkwrite: fix wrong guard position for pk_get_opaque_ec_family() Signed-off-by: Valerio Setti --- library/pkwrite.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/pkwrite.c b/library/pkwrite.c index e6f1aefaf3..5f801e27d4 100644 --- a/library/pkwrite.c +++ b/library/pkwrite.c @@ -76,7 +76,6 @@ static inline int mbedtls_pk_is_rfc8410(const mbedtls_pk_context *pk) #endif return 0; } -#endif /* MBEDTLS_PK_HAVE_RFC8410_CURVES */ #if defined(MBEDTLS_USE_PSA_CRYPTO) /* It is assumed that the input key is opaque */ @@ -93,7 +92,11 @@ static psa_ecc_family_t pk_get_opaque_ec_family(const mbedtls_pk_context *pk) return ec_family; } +#endif /* MBETLS_USE_PSA_CRYPTO */ +#endif /* MBEDTLS_PK_HAVE_RFC8410_CURVES */ +#endif /* MBEDTLS_PK_HAVE_ECC_KEYS */ +#if defined(MBEDTLS_USE_PSA_CRYPTO) /* It is assumed that the input key is opaque */ static psa_key_type_t pk_get_opaque_key_type(const mbedtls_pk_context *pk) { @@ -109,7 +112,6 @@ static psa_key_type_t pk_get_opaque_key_type(const mbedtls_pk_context *pk) return opaque_key_type; } #endif /* MBETLS_USE_PSA_CRYPTO */ -#endif /* MBEDTLS_PK_HAVE_ECC_KEYS */ #if defined(MBEDTLS_RSA_C) /*