mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-10 21:35:30 +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…
Reference in a new issue