mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-29 22:20:30 +00:00
Run extra complete in failure tests regardless.
We do not need to expect to fail, running another complete in either sign or verify after successful completion should also return BAD_STATE. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
7ef174b285
commit
efebad0d67
@ -6702,13 +6702,12 @@ void sign_hash_fail_interruptible(int key_type_arg, data_t *key_data,
|
||||
|
||||
TEST_EQUAL(actual_status, expected_complete_status);
|
||||
|
||||
if (expected_complete_status != PSA_SUCCESS) {
|
||||
actual_status = psa_sign_hash_complete(&operation, signature,
|
||||
signature_size,
|
||||
&signature_length);
|
||||
/* Check that another complete returns BAD_STATE. */
|
||||
actual_status = psa_sign_hash_complete(&operation, signature,
|
||||
signature_size,
|
||||
&signature_length);
|
||||
|
||||
TEST_EQUAL(actual_status, PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
TEST_EQUAL(actual_status, PSA_ERROR_BAD_STATE);
|
||||
|
||||
PSA_ASSERT(psa_sign_hash_abort(&operation));
|
||||
|
||||
@ -7160,11 +7159,9 @@ void verify_hash_fail_interruptible(int key_type_arg, data_t *key_data,
|
||||
|
||||
TEST_EQUAL(actual_status, expected_complete_status);
|
||||
|
||||
if (expected_complete_status != PSA_SUCCESS) {
|
||||
actual_status = psa_verify_hash_complete(&operation);
|
||||
|
||||
TEST_EQUAL(actual_status, PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
/* Check that another complete returns BAD_STATE. */
|
||||
actual_status = psa_verify_hash_complete(&operation);
|
||||
TEST_EQUAL(actual_status, PSA_ERROR_BAD_STATE);
|
||||
|
||||
TEST_LE_U(min_completes, num_completes);
|
||||
TEST_LE_U(num_completes, max_completes);
|
||||
|
Loading…
x
Reference in New Issue
Block a user