From 7533982f68c26a57a432fe446c5c3ba9aa9bbf3a Mon Sep 17 00:00:00 2001 From: Jerry Yu Date: Wed, 23 Mar 2022 12:06:31 +0800 Subject: [PATCH] guard pk_error_from_psa_ecdsa with USE_PSA_CRYPTO Signed-off-by: Jerry Yu --- library/pk_wrap.c | 4 ++-- library/pk_wrap.h | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/library/pk_wrap.c b/library/pk_wrap.c index 2badfe7af..9c6cf9c91 100644 --- a/library/pk_wrap.c +++ b/library/pk_wrap.c @@ -147,9 +147,9 @@ int mbedtls_pk_error_from_psa_ecdsa( psa_status_t status ) return( mbedtls_pk_error_from_psa( status ) ); } } -#endif +#endif /* PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY */ -#endif +#endif /* MBEDTLS_USE_PSA_CRYPTO */ #if defined(MBEDTLS_RSA_C) static int rsa_can_do( mbedtls_pk_type_t type ) diff --git a/library/pk_wrap.h b/library/pk_wrap.h index 02a636f8b..7375da134 100644 --- a/library/pk_wrap.h +++ b/library/pk_wrap.h @@ -137,15 +137,16 @@ extern const mbedtls_pk_info_t mbedtls_rsa_alt_info; #if defined(MBEDTLS_USE_PSA_CRYPTO) extern const mbedtls_pk_info_t mbedtls_pk_opaque_info; -#endif - -#if defined(MBEDTLS_PSA_CRYPTO_C) -int mbedtls_pk_error_from_psa( psa_status_t status ); #if defined(PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY) int mbedtls_pk_error_from_psa_ecdsa( psa_status_t status ); #endif +#endif + +#if defined(MBEDTLS_PSA_CRYPTO_C) +int mbedtls_pk_error_from_psa( psa_status_t status ); + #if defined(PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY) int mbedtls_pk_error_from_psa_rsa( psa_status_t status ); #endif