mirror of https://github.com/ARMmbed/mbed-os.git
Fix for resource leak in crypto compliance test 43
Destroy key after import key in a looppull/9312/head
parent
95d0c4d38d
commit
172fd650a2
|
@ -108,6 +108,10 @@ int32_t psa_key_agreement_test(security_t caller)
|
||||||
/* Abort a generator */
|
/* Abort a generator */
|
||||||
status = val->crypto_function(VAL_CRYPTO_GENERATOR_ABORT, &generator);
|
status = val->crypto_function(VAL_CRYPTO_GENERATOR_ABORT, &generator);
|
||||||
TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(12));
|
TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(12));
|
||||||
|
|
||||||
|
/* Destroy a key and restore the slot to its default state */
|
||||||
|
status = val->crypto_function(VAL_CRYPTO_DESTROY_KEY, check1[i].key_handle);
|
||||||
|
TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(13));
|
||||||
}
|
}
|
||||||
|
|
||||||
return VAL_STATUS_SUCCESS;
|
return VAL_STATUS_SUCCESS;
|
||||||
|
|
Loading…
Reference in New Issue