From 01b929c85bfd2737402d2fcb57db86e845a42a0f Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 18 Jun 2018 16:40:34 +0200 Subject: [PATCH] Fix key_lifetime_set_fail not cleaning up the right key slot --- tests/suites/test_suite_psa_crypto.function | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index 3786e57a3..01262e038 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -1210,17 +1210,17 @@ void key_lifetime_set_fail( int key_slot_arg, int lifetime_arg, int expected_status_arg ) { - int key_slot = 1; + psa_key_slot_t key_slot = key_slot_arg; psa_key_lifetime_t lifetime_set = lifetime_arg; psa_status_t actual_status; psa_status_t expected_status = expected_status_arg; TEST_ASSERT( psa_crypto_init( ) == PSA_SUCCESS ); - actual_status = psa_set_key_lifetime( key_slot_arg, lifetime_set ); + actual_status = psa_set_key_lifetime( key_slot, lifetime_set ); if( actual_status == PSA_SUCCESS ) - actual_status = psa_set_key_lifetime( key_slot_arg, lifetime_set ); + actual_status = psa_set_key_lifetime( key_slot, lifetime_set ); TEST_ASSERT( expected_status == actual_status );