1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-05 19:35:48 +03:00

Rename verify_RSA_hash_input_and_get_md_type

Give it a shorter name that's more in line with our naming conventions.
This commit is contained in:
Gilles Peskine
2018-06-08 16:34:46 +02:00
committed by itayzafrir
parent 61b91d4476
commit 8b18a4fef3

View File

@@ -1203,7 +1203,9 @@ psa_status_t psa_mac_verify( psa_mac_operation_t *operation,
/* Asymmetric cryptography */ /* Asymmetric cryptography */
/****************************************************************/ /****************************************************************/
static psa_status_t verify_RSA_hash_input_and_get_md_type( psa_algorithm_t alg, /* Decode the hash algorithm from alg and store the mbedtls encoding in
* md_alg. Verify that the hash length is consistent. */
static psa_status_t psa_rsa_decode_md_type( psa_algorithm_t alg,
size_t hash_length, size_t hash_length,
mbedtls_md_type_t *md_alg ) mbedtls_md_type_t *md_alg )
{ {
@@ -1259,8 +1261,7 @@ psa_status_t psa_asymmetric_sign( psa_key_slot_t key,
mbedtls_rsa_context *rsa = slot->data.rsa; mbedtls_rsa_context *rsa = slot->data.rsa;
int ret; int ret;
mbedtls_md_type_t md_alg; mbedtls_md_type_t md_alg;
status = verify_RSA_hash_input_and_get_md_type( alg, hash_length, status = psa_rsa_decode_md_type( alg, hash_length, &md_alg );
&md_alg );
if( status != PSA_SUCCESS ) if( status != PSA_SUCCESS )
return( status ); return( status );
@@ -1355,8 +1356,7 @@ psa_status_t psa_asymmetric_verify( psa_key_slot_t key,
mbedtls_rsa_context *rsa = slot->data.rsa; mbedtls_rsa_context *rsa = slot->data.rsa;
int ret; int ret;
mbedtls_md_type_t md_alg; mbedtls_md_type_t md_alg;
status = verify_RSA_hash_input_and_get_md_type( alg, hash_length, status = psa_rsa_decode_md_type( alg, hash_length, &md_alg );
&md_alg );
if( status != PSA_SUCCESS ) if( status != PSA_SUCCESS )
return( status ); return( status );