Update tests for psa_close_key for invalid key.
Update expected return values of psa_close_key() to
PSA_ERROR_INVALID_HANDLE for invalid key handle operations.
Signed-off-by: Maulik Patel <Maulik.Patel@arm.com>
diff --git a/tests/suites/test_suite_psa_crypto_slot_management.function b/tests/suites/test_suite_psa_crypto_slot_management.function
index bafb7d8..9b07c8c 100644
--- a/tests/suites/test_suite_psa_crypto_slot_management.function
+++ b/tests/suites/test_suite_psa_crypto_slot_management.function
@@ -179,7 +179,7 @@
/* Test that the key is now invalid. */
TEST_EQUAL( psa_get_key_attributes( key, &attributes ),
PSA_ERROR_DOES_NOT_EXIST );
- TEST_EQUAL( psa_close_key( key ), PSA_ERROR_DOES_NOT_EXIST );
+ TEST_EQUAL( psa_close_key( key ), PSA_ERROR_INVALID_HANDLE );
exit:
/*
@@ -327,7 +327,7 @@
*/
TEST_EQUAL( psa_get_key_attributes( handle, &read_attributes ),
PSA_ERROR_DOES_NOT_EXIST );
- TEST_EQUAL( psa_close_key( handle ), PSA_ERROR_DOES_NOT_EXIST );
+ TEST_EQUAL( psa_close_key( handle ), PSA_ERROR_INVALID_HANDLE );
TEST_EQUAL( psa_get_key_attributes( id, &read_attributes ),
PSA_ERROR_DOES_NOT_EXIST );
break;