Add interruptible to psa_op_fail tests
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
diff --git a/tests/suites/test_suite_psa_crypto_op_fail.function b/tests/suites/test_suite_psa_crypto_op_fail.function
index 046e3c3..970be84 100644
--- a/tests/suites/test_suite_psa_crypto_op_fail.function
+++ b/tests/suites/test_suite_psa_crypto_op_fail.function
@@ -221,6 +221,13 @@
uint8_t input[1] = { 'A' };
uint8_t output[PSA_SIGNATURE_MAX_SIZE] = { 0 };
size_t length = SIZE_MAX;
+ psa_sign_hash_interruptible_operation_t sign_operation =
+ psa_sign_hash_interruptible_operation_init();
+
+ psa_verify_hash_interruptible_operation_t verify_operation =
+ psa_verify_hash_interruptible_operation_init();
+
+
PSA_INIT();
@@ -237,6 +244,15 @@
psa_sign_hash(key_id, alg,
input, sizeof(input),
output, sizeof(output), &length));
+
+ if (PSA_KEY_TYPE_IS_ECC(key_type)) {
+ TEST_STATUS(expected_status,
+ psa_sign_hash_start(&sign_operation, key_id, alg,
+ input, sizeof(input)));
+
+ PSA_ASSERT(psa_sign_hash_abort(&sign_operation));
+ }
+
if (!private_only) {
/* Determine a plausible signature size to avoid an INVALID_SIGNATURE
* error based on this. */
@@ -253,6 +269,15 @@
psa_verify_hash(key_id, alg,
input, sizeof(input),
output, output_length));
+
+ if (PSA_KEY_TYPE_IS_ECC(key_type)) {
+ TEST_STATUS(expected_status,
+ psa_verify_hash_start(&verify_operation, key_id, alg,
+ input, sizeof(input),
+ output, output_length));
+
+ PSA_ASSERT(psa_verify_hash_abort(&verify_operation));
+ }
}
exit: