mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 22:45:46 +01:00
adjust indentation per Mbed TLS standards
This commit is contained in:
parent
a28258c594
commit
f55e804e07
@ -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 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user