From 15565eeb59e41d204a38897977361151b255adaa Mon Sep 17 00:00:00 2001 From: Przemek Stekiel Date: Tue, 1 Mar 2022 17:01:39 +0100 Subject: [PATCH] Move publick key check out of MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR Signed-off-by: Przemek Stekiel --- library/psa_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 9178e23d2..233d50044 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -5017,10 +5017,10 @@ static psa_status_t psa_generate_derived_key_internal( size_t storage_size = bytes; psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; -#if defined(MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR) if( PSA_KEY_TYPE_IS_PUBLIC_KEY( slot->attr.type ) ) return( PSA_ERROR_INVALID_ARGUMENT ); +#if defined(MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR) if ( PSA_KEY_TYPE_IS_ECC( slot->attr.type ) ) { psa_ecc_family_t curve = PSA_KEY_TYPE_ECC_GET_FAMILY( slot->attr.type );