Change incorrect define for MAX_OPS_UNLIMITED
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
diff --git a/include/psa/crypto_values.h b/include/psa/crypto_values.h
index 07e96f7..39acd96 100644
--- a/include/psa/crypto_values.h
+++ b/include/psa/crypto_values.h
@@ -2756,7 +2756,7 @@
* the maximum number of ops allowed to be executed by an interruptible
* function in a single call.
*/
-#define PSA_INTERRUPTIBLE_MAX_OPS_UNLIMITED INT32_MAX
+#define PSA_INTERRUPTIBLE_MAX_OPS_UNLIMITED UINT32_MAX
/**@}*/
diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function
index 7f50e96..7b9daae 100644
--- a/tests/suites/test_suite_psa_crypto.function
+++ b/tests/suites/test_suite_psa_crypto.function
@@ -6447,7 +6447,7 @@
/* BEGIN_CASE depends_on:MBEDTLS_ECP_RESTARTABLE */
void sign_hash_interruptible(int key_type_arg, data_t *key_data,
int alg_arg, data_t *input_data,
- data_t *output_data, int max_ops)
+ data_t *output_data, int max_ops_arg)
{
mbedtls_svc_key_id_t key = MBEDTLS_SVC_KEY_ID_INIT;
psa_key_type_t key_type = key_type_arg;
@@ -6458,11 +6458,13 @@
size_t signature_length = 0xdeadbeef;
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_status_t status = PSA_OPERATION_INCOMPLETE;
- size_t num_ops = 0;
+ uint32_t num_ops = 0;
+ uint32_t max_ops = max_ops_arg;
size_t num_ops_prior = 0;
size_t num_completes = 0;
size_t min_completes = 0;
size_t max_completes = 0;
+
psa_sign_hash_interruptible_operation_t operation =
psa_sign_hash_interruptible_operation_init();
@@ -6599,7 +6601,7 @@
int signature_size_arg,
int expected_start_status_arg,
int expected_complete_status_arg,
- int max_ops)
+ int max_ops_arg)
{
mbedtls_svc_key_id_t key = MBEDTLS_SVC_KEY_ID_INIT;
psa_key_type_t key_type = key_type_arg;
@@ -6610,7 +6612,8 @@
psa_status_t expected_complete_status = expected_complete_status_arg;
unsigned char *signature = NULL;
size_t signature_length = 0xdeadbeef;
- size_t num_ops = 0;
+ uint32_t num_ops = 0;
+ uint32_t max_ops = max_ops_arg;
size_t num_ops_prior = 0;
size_t num_completes = 0;
size_t min_completes = 0;
@@ -6779,7 +6782,7 @@
/* BEGIN_CASE depends_on:MBEDTLS_ECP_RESTARTABLE */
void sign_verify_hash_interruptible(int key_type_arg, data_t *key_data,
int alg_arg, data_t *input_data,
- int max_ops)
+ int max_ops_arg)
{
mbedtls_svc_key_id_t key = MBEDTLS_SVC_KEY_ID_INIT;
psa_key_type_t key_type = key_type_arg;
@@ -6790,6 +6793,7 @@
size_t signature_length = 0xdeadbeef;
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_status_t status = PSA_OPERATION_INCOMPLETE;
+ uint32_t max_ops = max_ops_arg;
size_t num_completes = 0;
size_t min_completes = 0;
size_t max_completes = 0;
@@ -6946,14 +6950,15 @@
/* BEGIN_CASE depends_on:MBEDTLS_ECP_RESTARTABLE */
void verify_hash_interruptible(int key_type_arg, data_t *key_data,
int alg_arg, data_t *hash_data,
- data_t *signature_data, int max_ops)
+ data_t *signature_data, int max_ops_arg)
{
mbedtls_svc_key_id_t key = MBEDTLS_SVC_KEY_ID_INIT;
psa_key_type_t key_type = key_type_arg;
psa_algorithm_t alg = alg_arg;
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_status_t status = PSA_OPERATION_INCOMPLETE;
- size_t num_ops = 0;
+ uint32_t num_ops = 0;
+ uint32_t max_ops = max_ops_arg;
size_t num_ops_prior = 0;
size_t num_completes = 0;
size_t min_completes = 0;
@@ -7068,7 +7073,7 @@
data_t *signature_data,
int expected_start_status_arg,
int expected_complete_status_arg,
- int max_ops)
+ int max_ops_arg)
{
mbedtls_svc_key_id_t key = MBEDTLS_SVC_KEY_ID_INIT;
psa_key_type_t key_type = key_type_arg;
@@ -7077,7 +7082,8 @@
psa_status_t expected_start_status = expected_start_status_arg;
psa_status_t expected_complete_status = expected_complete_status_arg;
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
- size_t num_ops = 0;
+ uint32_t num_ops = 0;
+ uint32_t max_ops = max_ops_arg;
size_t num_ops_prior = 0;
size_t num_completes = 0;
size_t min_completes = 0;