mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 04:45:44 +01:00
tests: slot mgmt: Add purge checks in volatile key lifecycle test
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
5425a21fd2
commit
3930997922
@ -157,6 +157,16 @@ void transient_slot_lifecycle( int usage_arg, int alg_arg,
|
||||
TEST_ASSERT( ! mbedtls_svc_key_id_is_null( key ) );
|
||||
PSA_ASSERT( psa_get_key_attributes( key, &attributes ) );
|
||||
TEST_EQUAL( psa_get_key_type( &attributes ), type );
|
||||
psa_reset_key_attributes( &attributes );
|
||||
|
||||
/*
|
||||
* Purge the key and make sure that it is still valid, as purging a
|
||||
* volatile key shouldn't invalidate/destroy it.
|
||||
*/
|
||||
PSA_ASSERT( psa_purge_key( key ) );
|
||||
PSA_ASSERT( psa_get_key_attributes( key, &attributes ) );
|
||||
TEST_EQUAL( psa_get_key_type( &attributes ), type );
|
||||
psa_reset_key_attributes( &attributes );
|
||||
|
||||
/* Do something that invalidates the key. */
|
||||
if( ! invalidate_key( close_method, key ) )
|
||||
|
Loading…
Reference in New Issue
Block a user