Note that a failure in cleanup is intentional

In the cleanup code for persistent_key_load_key_from_storage(), we
only attempt to reopen the key so that it will be deleted if it exists
at that point. It's intentional that we do nothing if psa_open_key()
fails here.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2020-08-26 00:06:25 +02:00
parent 64f13ef6ab
commit e92c68a878

View file

@ -5651,7 +5651,7 @@ exit:
/* In case there was a test failure after creating the persistent key /* In case there was a test failure after creating the persistent key
* but while it was not open, try to re-open the persistent key * but while it was not open, try to re-open the persistent key
* to delete it. */ * to delete it. */
psa_open_key( key_id, &handle ); (void) psa_open_key( key_id, &handle );
} }
psa_destroy_key( handle ); psa_destroy_key( handle );
PSA_DONE(); PSA_DONE();