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>
diff --git a/library/psa_crypto_slot_management.c b/library/psa_crypto_slot_management.c
index 33149f0..b6f76ad 100644
--- a/library/psa_crypto_slot_management.c
+++ b/library/psa_crypto_slot_management.c
@@ -332,7 +332,7 @@
     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 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 );