Readability improvement in pk_wrap.c

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard 2022-12-09 09:57:39 +01:00
parent b2812cc274
commit df0c73c308

View File

@ -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 =