From f55e804e0765249061977d2e3d165175c73560ae Mon Sep 17 00:00:00 2001 From: Moran Peker Date: Tue, 29 May 2018 16:28:28 +0300 Subject: [PATCH] adjust indentation per Mbed TLS standards --- tests/suites/test_suite_psa_crypto.function | 36 ++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index bc46ad215..081b8d571 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -568,12 +568,12 @@ void cipher_test_positive( int alg_arg, int key_type_arg, TEST_ASSERT( psa_encrypt_set_iv( &operation, iv, sizeof( iv ) ) == PSA_SUCCESS ); - output = mbedtls_calloc(0, output_size); + output = mbedtls_calloc(0, output_size); TEST_ASSERT( psa_cipher_update( &operation, input, input_size, output, output_size, &output_length) == PSA_SUCCESS ); - TEST_ASSERT( psa_cipher_finish( &operation, output + output_length, + TEST_ASSERT( psa_cipher_finish( &operation, output + output_length, output_size, &output_length) == PSA_SUCCESS ); TEST_ASSERT( psa_cipher_abort( &operation ) == PSA_SUCCESS ); @@ -631,12 +631,12 @@ void cipher_test_decrypt( int alg_arg, int key_type_arg, TEST_ASSERT( psa_encrypt_set_iv( &operation, iv, sizeof( iv ) ) == PSA_SUCCESS ); - output = mbedtls_calloc(0, output_size); + output = mbedtls_calloc(0, output_size); TEST_ASSERT( psa_cipher_update( &operation, input, input_size, output, output_size, &output_length) == PSA_SUCCESS ); - TEST_ASSERT( psa_cipher_finish( &operation, output + output_length, + TEST_ASSERT( psa_cipher_finish( &operation, output + output_length, output_size, &output_length) == PSA_SUCCESS ); TEST_ASSERT( psa_cipher_abort( &operation ) == PSA_SUCCESS ); @@ -689,35 +689,35 @@ void cipher_test_verify_output( int alg_arg, int key_type_arg, TEST_ASSERT( psa_import_key( key_slot, key_type, key, key_size ) == PSA_SUCCESS ); - TEST_ASSERT( psa_encrypt_setup( &operation1, key_slot, alg ) == PSA_SUCCESS ); - TEST_ASSERT( psa_decrypt_setup( &operation2, key_slot, alg ) == PSA_SUCCESS ); + TEST_ASSERT( psa_encrypt_setup( &operation1, key_slot, alg ) == PSA_SUCCESS ); + TEST_ASSERT( psa_decrypt_setup( &operation2, key_slot, alg ) == PSA_SUCCESS ); TEST_ASSERT( psa_encrypt_generate_iv( &operation1, iv, iv_size, &iv_length) == PSA_SUCCESS ); - output1_size = input_size; - output1 = mbedtls_calloc(0, output1_size); + output1_size = input_size; + output1 = mbedtls_calloc(0, output1_size); TEST_ASSERT( psa_cipher_update( &operation1, input, input_size, output1, output1_size, &output1_length) == PSA_SUCCESS ); - TEST_ASSERT( psa_cipher_finish( &operation1, output1 + output1_length, - output1_size, &tmp_output_length) == PSA_SUCCESS ); + TEST_ASSERT( psa_cipher_finish( &operation1, output1 + output1_length, + output1_size, &tmp_output_length) == PSA_SUCCESS ); output1_length += tmp_output_length; TEST_ASSERT( psa_cipher_abort( &operation1 ) == PSA_SUCCESS ); - output2_size = output1_length; - output2 = mbedtls_calloc(0, output2_size); + output2_size = output1_length; + output2 = mbedtls_calloc(0, output2_size); - TEST_ASSERT( psa_encrypt_set_iv( &operation2, iv, - iv_length) == PSA_SUCCESS ); + TEST_ASSERT( psa_encrypt_set_iv( &operation2, iv, + iv_length) == PSA_SUCCESS ); TEST_ASSERT( psa_cipher_update( &operation2, output1, output1_length, output2, output2_size, &output2_length) == PSA_SUCCESS ); tmp_output_length = 0; - TEST_ASSERT( psa_cipher_finish( &operation2, output2 + output2_length, - output2_size, &tmp_output_length) == PSA_SUCCESS ); - - output2_length += tmp_output_length; + TEST_ASSERT( psa_cipher_finish( &operation2, output2 + output2_length, + output2_size, &tmp_output_length) == PSA_SUCCESS ); + + output2_length += tmp_output_length; TEST_ASSERT( psa_cipher_abort( &operation1 ) == PSA_SUCCESS );