mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-06-05 00:22:11 +03:00
Remove confising comments
Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
This commit is contained in:
parent
22984de191
commit
dad6f3b5a0
@ -3272,7 +3272,6 @@ static psa_status_t psa_cipher_setup( psa_cipher_operation_t *operation,
|
|||||||
if( ! PSA_ALG_IS_CIPHER( alg ) )
|
if( ! PSA_ALG_IS_CIPHER( alg ) )
|
||||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||||
|
|
||||||
/* Fetch key material from key storage. */
|
|
||||||
status = psa_get_and_lock_key_slot_with_policy( key, &slot, usage, alg );
|
status = psa_get_and_lock_key_slot_with_policy( key, &slot, usage, alg );
|
||||||
if( status != PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
goto exit;
|
goto exit;
|
||||||
@ -3497,7 +3496,6 @@ psa_status_t psa_cipher_encrypt( mbedtls_svc_key_id_t key,
|
|||||||
if( ! PSA_ALG_IS_CIPHER( alg ) )
|
if( ! PSA_ALG_IS_CIPHER( alg ) )
|
||||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||||
|
|
||||||
/* Fetch key material from key storage. */
|
|
||||||
status = psa_get_and_lock_key_slot_with_policy( key, &slot,
|
status = psa_get_and_lock_key_slot_with_policy( key, &slot,
|
||||||
PSA_KEY_USAGE_ENCRYPT,
|
PSA_KEY_USAGE_ENCRYPT,
|
||||||
alg );
|
alg );
|
||||||
@ -3547,11 +3545,9 @@ psa_status_t psa_cipher_decrypt( mbedtls_svc_key_id_t key,
|
|||||||
psa_status_t unlock_status = PSA_ERROR_CORRUPTION_DETECTED;
|
psa_status_t unlock_status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||||
psa_key_slot_t *slot;
|
psa_key_slot_t *slot;
|
||||||
|
|
||||||
/* The requested algorithm must be one that can be processed by cipher. */
|
|
||||||
if( ! PSA_ALG_IS_CIPHER( alg ) )
|
if( ! PSA_ALG_IS_CIPHER( alg ) )
|
||||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||||
|
|
||||||
/* Fetch key material from key storage. */
|
|
||||||
status = psa_get_and_lock_key_slot_with_policy( key, &slot,
|
status = psa_get_and_lock_key_slot_with_policy( key, &slot,
|
||||||
PSA_KEY_USAGE_DECRYPT,
|
PSA_KEY_USAGE_DECRYPT,
|
||||||
alg );
|
alg );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user