Skip to content

Commit

Permalink
Revert "Add testing valid attributes after aborting an invalid input …
Browse files Browse the repository at this point in the history
…in iop key generation"

This reverts commit 005b78c.

Signed-off-by: Waleed Elmelegy <[email protected]>
  • Loading branch information
waleed-elmelegy-arm committed Nov 4, 2024
1 parent 005b78c commit 1f5075b
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions tf-psa-crypto/tests/suites/test_suite_psa_crypto.function
Original file line number Diff line number Diff line change
Expand Up @@ -10146,21 +10146,9 @@ void generate_key(int type_arg,

PSA_ASSERT(psa_generate_key_iop_abort(&operation));

#if defined(MBEDTLS_ECP_RESTARTABLE)
/* In case the expected status is a failure test a valid input will succeed after abort */
if (expected_status != PSA_SUCCESS) {
memset(&attributes, 0, sizeof(attributes));
psa_set_key_type(&attributes, PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1));
psa_set_key_bits(&attributes, 256);
psa_set_key_usage_flags(&attributes,
PSA_KEY_USAGE_EXPORT | PSA_KEY_USAGE_SIGN_HASH |
PSA_KEY_USAGE_VERIFY_HASH);
psa_set_key_algorithm(&attributes, PSA_ALG_ECDSA_ANY);
}
/* Test that after calling abort operation is reset to it's fresh state */
status = psa_generate_key_iop_setup(&operation, &attributes);
TEST_EQUAL(status, PSA_SUCCESS);
#endif
TEST_EQUAL(status, expected_status);

exit:
psa_generate_key_iop_abort(&operation);
Expand Down

0 comments on commit 1f5075b

Please sign in to comment.