mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-25 09:41:00 +00:00
Rename helper function to psa_aead_check_algorithm
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
parent
08f34656cb
commit
39fb9d170b
@ -3719,7 +3719,7 @@ static psa_status_t psa_aead_check_nonce_length( psa_algorithm_t alg,
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
}
|
||||
|
||||
static psa_status_t psa_aead_initial_checks( psa_algorithm_t alg ) {
|
||||
static psa_status_t psa_aead_check_algorithm( psa_algorithm_t alg ) {
|
||||
if( !PSA_ALG_IS_AEAD( alg ) || PSA_ALG_IS_WILDCARD( alg ) )
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
|
||||
@ -3743,7 +3743,7 @@ psa_status_t psa_aead_encrypt( mbedtls_svc_key_id_t key,
|
||||
|
||||
*ciphertext_length = 0;
|
||||
|
||||
status = psa_aead_initial_checks( alg );
|
||||
status = psa_aead_check_algorithm( alg );
|
||||
if( status != PSA_SUCCESS )
|
||||
return( status );
|
||||
|
||||
@ -3794,7 +3794,7 @@ psa_status_t psa_aead_decrypt( mbedtls_svc_key_id_t key,
|
||||
|
||||
*plaintext_length = 0;
|
||||
|
||||
status = psa_aead_initial_checks( alg );
|
||||
status = psa_aead_check_algorithm( alg );
|
||||
if( status != PSA_SUCCESS )
|
||||
return( status );
|
||||
|
||||
@ -3839,7 +3839,7 @@ static psa_status_t psa_aead_setup( psa_aead_operation_t *operation,
|
||||
psa_key_slot_t *slot = NULL;
|
||||
psa_key_usage_t key_usage = 0;
|
||||
|
||||
status = psa_aead_initial_checks( alg );
|
||||
status = psa_aead_check_algorithm( alg );
|
||||
if( status != PSA_SUCCESS )
|
||||
goto exit;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user