Change incorrect define for MAX_OPS_UNLIMITED

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
Paul Elliott 2023-02-03 15:49:42 +00:00
parent 4ca521fcdb
commit ab7c5c8550
2 changed files with 16 additions and 10 deletions

View file

@ -2756,7 +2756,7 @@ static inline int mbedtls_svc_key_id_is_null(mbedtls_svc_key_id_t key)
* 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
/**@}*/

View file

@ -6447,7 +6447,7 @@ exit:
/* 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 @@ void sign_hash_interruptible(int key_type_arg, data_t *key_data,
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 @@ void sign_hash_fail_interruptible(int key_type_arg, data_t *key_data,
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 @@ void sign_hash_fail_interruptible(int key_type_arg, data_t *key_data,
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 @@ exit:
/* 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 @@ void sign_verify_hash_interruptible(int key_type_arg, data_t *key_data,
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 @@ exit:
/* 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 @@ void verify_hash_fail_interruptible(int key_type_arg, data_t *key_data,
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 @@ void verify_hash_fail_interruptible(int key_type_arg, data_t *key_data,
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;