mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 17:35:38 +01:00
Increment the test step number when invalidating a key
This makes failure messages easier to understand. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
65048ad648
commit
6e0d5bd00d
@ -1467,6 +1467,7 @@ void register_key_smoke_test( int lifetime_arg,
|
||||
( validate > 0 ? PSA_SUCCESS : PSA_ERROR_NOT_PERMITTED );
|
||||
}
|
||||
|
||||
mbedtls_test_set_step( 1 );
|
||||
PSA_ASSERT( psa_register_se_driver( MIN_DRIVER_LOCATION, &driver ) );
|
||||
PSA_ASSERT( psa_crypto_init( ) );
|
||||
|
||||
@ -1496,6 +1497,7 @@ void register_key_smoke_test( int lifetime_arg,
|
||||
PSA_ASSERT( psa_purge_key( id ) );
|
||||
|
||||
/* Restart and try again. */
|
||||
mbedtls_test_set_step( 2 );
|
||||
PSA_SESSION_DONE( );
|
||||
PSA_ASSERT( psa_register_se_driver( location, &driver ) );
|
||||
PSA_ASSERT( psa_crypto_init( ) );
|
||||
|
@ -123,6 +123,7 @@ void transient_slot_lifecycle( int owner_id_arg,
|
||||
mbedtls_svc_key_id_t key = MBEDTLS_SVC_KEY_ID_INIT;
|
||||
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
|
||||
|
||||
mbedtls_test_set_step( 1 );
|
||||
PSA_ASSERT( psa_crypto_init( ) );
|
||||
|
||||
/* Import a key. */
|
||||
@ -169,6 +170,7 @@ void transient_slot_lifecycle( int owner_id_arg,
|
||||
psa_reset_key_attributes( &attributes );
|
||||
|
||||
/* Do something that invalidates the key. */
|
||||
mbedtls_test_set_step( 2 );
|
||||
if( ! invalidate_key( invalidate_method, key ) )
|
||||
goto exit;
|
||||
if( ! invalidate_psa( invalidate_method ) )
|
||||
@ -218,6 +220,7 @@ void persistent_slot_lifecycle( int lifetime_arg, int owner_id_arg, int id_arg,
|
||||
|
||||
TEST_USES_KEY_ID( id );
|
||||
|
||||
mbedtls_test_set_step( 1 );
|
||||
PSA_ASSERT( psa_crypto_init( ) );
|
||||
|
||||
psa_set_key_id( &attributes, id );
|
||||
@ -267,6 +270,7 @@ void persistent_slot_lifecycle( int lifetime_arg, int owner_id_arg, int id_arg,
|
||||
* Do something that wipes key data in volatile memory or destroy the
|
||||
* key.
|
||||
*/
|
||||
mbedtls_test_set_step( 2 );
|
||||
if( ! invalidate_key( invalidate_method, id ) )
|
||||
goto exit;
|
||||
if( ! invalidate_psa( invalidate_method ) )
|
||||
|
Loading…
Reference in New Issue
Block a user