mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-26 12:39:55 +00:00
Fix close/purge of a key
In case of persistent keys, do not load the key in a slot before to close/purge it. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
97c8ad5fee
commit
513451987d
@ -332,7 +332,7 @@ psa_status_t psa_close_key( psa_key_handle_t handle )
|
||||
if( psa_key_handle_is_null( handle ) )
|
||||
return( PSA_SUCCESS );
|
||||
|
||||
status = psa_get_key_slot( handle, &slot );
|
||||
status = psa_search_key_in_slots( handle, &slot );
|
||||
if( status != PSA_SUCCESS )
|
||||
return( status );
|
||||
|
||||
@ -344,7 +344,7 @@ psa_status_t psa_purge_key( mbedtls_svc_key_id_t key )
|
||||
psa_status_t status;
|
||||
psa_key_slot_t *slot;
|
||||
|
||||
status = psa_get_key_slot( key, &slot );
|
||||
status = psa_search_key_in_slots( key, &slot );
|
||||
if( status != PSA_SUCCESS )
|
||||
return( status );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user