From df0c73c3085477714d3c5fd3fb14a8973573a24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 9 Dec 2022 09:57:39 +0100 Subject: [PATCH] Readability improvement in pk_wrap.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- library/pk_wrap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/library/pk_wrap.c b/library/pk_wrap.c index 00abffb2d..ea7d7263e 100644 --- a/library/pk_wrap.c +++ b/library/pk_wrap.c @@ -1162,12 +1162,11 @@ static int ecdsa_sign_wrap( void *ctx_arg, mbedtls_md_type_t md_alg, size_t key_len; unsigned char buf[MBEDTLS_PK_ECP_PRV_DER_MAX_BYTES]; unsigned char *p; + psa_algorithm_t psa_hash = mbedtls_hash_info_psa_from_md( md_alg ); #if defined(MBEDTLS_ECDSA_DETERMINISTIC) - psa_algorithm_t psa_sig_md = - PSA_ALG_DETERMINISTIC_ECDSA( mbedtls_hash_info_psa_from_md( md_alg ) ); + psa_algorithm_t psa_sig_md = PSA_ALG_DETERMINISTIC_ECDSA( psa_hash ); #else - psa_algorithm_t psa_sig_md = - PSA_ALG_ECDSA( mbedtls_hash_info_psa_from_md( md_alg ) ); + psa_algorithm_t psa_sig_md = PSA_ALG_ECDSA( psa_hash ); #endif size_t curve_bits; psa_ecc_family_t curve =