From 931fa6d663883e62c0b5a660cbdffcd0d4995bba Mon Sep 17 00:00:00 2001 From: itayzafrir Date: Wed, 24 Oct 2018 12:20:22 +0300 Subject: [PATCH] Remove input parameter validations from hash test functions Remove from hash_finish, hash_verify and hash_multi_part --- tests/suites/test_suite_psa_crypto.function | 24 --------------------- 1 file changed, 24 deletions(-) diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index f66c37b75..879a77c2f 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -1575,14 +1575,6 @@ void hash_finish( int alg_arg, data_t *input, data_t *expected_hash ) size_t actual_hash_length; psa_hash_operation_t operation; - TEST_ASSERT( expected_hash->len == PSA_HASH_SIZE( alg ) ); - TEST_ASSERT( expected_hash->len <= PSA_HASH_MAX_SIZE ); - - TEST_ASSERT( input != NULL ); - TEST_ASSERT( expected_hash != NULL ); - TEST_ASSERT( PSA_CRYPTO_TEST_SIZE_T_RANGE( input->len ) ); - TEST_ASSERT( PSA_CRYPTO_TEST_SIZE_T_RANGE( expected_hash->len ) ); - TEST_ASSERT( psa_crypto_init( ) == PSA_SUCCESS ); TEST_ASSERT( psa_hash_setup( &operation, alg ) == PSA_SUCCESS ); @@ -1605,14 +1597,6 @@ void hash_verify( int alg_arg, data_t *input, data_t *expected_hash ) psa_algorithm_t alg = alg_arg; psa_hash_operation_t operation; - TEST_ASSERT( expected_hash->len == PSA_HASH_SIZE( alg ) ); - TEST_ASSERT( expected_hash->len <= PSA_HASH_MAX_SIZE ); - - TEST_ASSERT( input != NULL ); - TEST_ASSERT( expected_hash != NULL ); - TEST_ASSERT( PSA_CRYPTO_TEST_SIZE_T_RANGE( input->len ) ); - TEST_ASSERT( PSA_CRYPTO_TEST_SIZE_T_RANGE( expected_hash->len ) ); - TEST_ASSERT( psa_crypto_init( ) == PSA_SUCCESS ); TEST_ASSERT( psa_hash_setup( &operation, alg ) == PSA_SUCCESS ); @@ -1784,14 +1768,6 @@ void hash_multi_part( int alg_arg, data_t *input, data_t *expected_hash ) psa_hash_operation_t operation; uint32_t halfway; - TEST_ASSERT( expected_hash->len == PSA_HASH_SIZE( alg ) ); - TEST_ASSERT( expected_hash->len <= PSA_HASH_MAX_SIZE ); - - TEST_ASSERT( input != NULL ); - TEST_ASSERT( expected_hash != NULL ); - TEST_ASSERT( PSA_CRYPTO_TEST_SIZE_T_RANGE( input->len ) ); - TEST_ASSERT( PSA_CRYPTO_TEST_SIZE_T_RANGE( expected_hash->len ) ); - TEST_ASSERT( psa_crypto_init( ) == PSA_SUCCESS ); TEST_ASSERT( psa_hash_setup( &operation, alg ) == PSA_SUCCESS );