tests: psa: Fix storage purge in se_driver_hal tests (1)

Remove systematic deletion of key file associated to key
identifier 0 as this file is not created under the hood
anymore by the library.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron 2020-08-26 15:42:34 +02:00
parent ecfb237f23
commit 978d57d61e

View file

@ -765,10 +765,10 @@ static void psa_purge_storage( void )
psa_key_location_t location; psa_key_location_t location;
/* The tests may have potentially created key ids from 1 to /* The tests may have potentially created key ids from 1 to
* MAX_KEY_ID_FOR_TEST. In addition, run the destroy function on key id * MAX_KEY_ID_FOR_TEST. */
* 0, which file-based storage uses as a temporary file. */ for( id = 1; id <= MAX_KEY_ID_FOR_TEST; id++ )
for( id = 0; id <= MAX_KEY_ID_FOR_TEST; id++ )
psa_destroy_persistent_key( mbedtls_svc_key_id_make( 1, id ) ); psa_destroy_persistent_key( mbedtls_svc_key_id_make( 1, id ) );
/* Purge the transaction file. */ /* Purge the transaction file. */
psa_crypto_stop_transaction( ); psa_crypto_stop_transaction( );
/* Purge driver persistent data. */ /* Purge driver persistent data. */