tests: Reformating due to hexcmp() renaming
Command to find the files in which lines have gone
larger than 79 characters due to the renaming:
grep '.\{80\}' \
`git diff-tree --no-commit-id --name-only -r HEAD` \
| grep hexcmp
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
diff --git a/tests/suites/test_suite_aes.function b/tests/suites/test_suite_aes.function
index 677978d..f1be3ce 100644
--- a/tests/suites/test_suite_aes.function
+++ b/tests/suites/test_suite_aes.function
@@ -23,7 +23,8 @@
{
TEST_ASSERT( mbedtls_aes_crypt_ecb( &ctx, MBEDTLS_AES_ENCRYPT, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 16, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 16, hex_dst_string->len ) == 0 );
}
exit:
@@ -47,7 +48,8 @@
{
TEST_ASSERT( mbedtls_aes_crypt_ecb( &ctx, MBEDTLS_AES_DECRYPT, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 16, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 16, hex_dst_string->len ) == 0 );
}
exit:
@@ -72,7 +74,9 @@
if( cbc_result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
}
exit:
@@ -96,7 +100,9 @@
if( cbc_result == 0)
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
}
exit:
@@ -243,7 +249,8 @@
mbedtls_aes_setkey_enc( &ctx, key_str->x, key_str->len * 8 );
TEST_ASSERT( mbedtls_aes_crypt_cfb128( &ctx, MBEDTLS_AES_ENCRYPT, 16, &iv_offset, iv_str->x, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 16, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 16, hex_dst_string->len ) == 0 );
exit:
mbedtls_aes_free( &ctx );
@@ -265,7 +272,8 @@
mbedtls_aes_setkey_enc( &ctx, key_str->x, key_str->len * 8 );
TEST_ASSERT( mbedtls_aes_crypt_cfb128( &ctx, MBEDTLS_AES_DECRYPT, 16, &iv_offset, iv_str->x, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 16, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 16, hex_dst_string->len ) == 0 );
exit:
mbedtls_aes_free( &ctx );
@@ -286,7 +294,9 @@
mbedtls_aes_setkey_enc( &ctx, key_str->x, key_str->len * 8 );
TEST_ASSERT( mbedtls_aes_crypt_cfb8( &ctx, MBEDTLS_AES_ENCRYPT, src_str->len, iv_str->x, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
exit:
mbedtls_aes_free( &ctx );
@@ -307,7 +317,9 @@
mbedtls_aes_setkey_enc( &ctx, key_str->x, key_str->len * 8 );
TEST_ASSERT( mbedtls_aes_crypt_cfb8( &ctx, MBEDTLS_AES_DECRYPT, src_str->len, iv_str->x, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
exit:
mbedtls_aes_free( &ctx );
diff --git a/tests/suites/test_suite_arc4.function b/tests/suites/test_suite_arc4.function
index 7f85df6..9aa4913 100644
--- a/tests/suites/test_suite_arc4.function
+++ b/tests/suites/test_suite_arc4.function
@@ -21,7 +21,9 @@
mbedtls_arc4_setup(&ctx, key_str->x, key_str->len);
TEST_ASSERT( mbedtls_arc4_crypt(&ctx, src_str->len, src_str->x, dst_str ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( dst_str, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( dst_str, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
exit:
mbedtls_arc4_free( &ctx );
diff --git a/tests/suites/test_suite_blowfish.function b/tests/suites/test_suite_blowfish.function
index d14555e..eb6891c 100644
--- a/tests/suites/test_suite_blowfish.function
+++ b/tests/suites/test_suite_blowfish.function
@@ -181,7 +181,8 @@
{
TEST_ASSERT( mbedtls_blowfish_crypt_ecb( &ctx, MBEDTLS_BLOWFISH_ENCRYPT, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 8, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 8, hex_dst_string->len ) == 0 );
}
exit:
@@ -205,7 +206,8 @@
{
TEST_ASSERT( mbedtls_blowfish_crypt_ecb( &ctx, MBEDTLS_BLOWFISH_DECRYPT, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 8, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 8, hex_dst_string->len ) == 0 );
}
exit:
@@ -231,7 +233,9 @@
if( cbc_result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
}
exit:
@@ -256,7 +260,9 @@
if( cbc_result == 0)
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
}
exit:
@@ -280,7 +286,9 @@
mbedtls_blowfish_setkey( &ctx, key_str->x, key_str->len * 8 );
TEST_ASSERT( mbedtls_blowfish_crypt_cfb64( &ctx, MBEDTLS_BLOWFISH_ENCRYPT, src_str->len, &iv_offset, iv_str->x, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
exit:
mbedtls_blowfish_free( &ctx );
@@ -303,7 +311,9 @@
mbedtls_blowfish_setkey( &ctx, key_str->x, key_str->len * 8 );
TEST_ASSERT( mbedtls_blowfish_crypt_cfb64( &ctx, MBEDTLS_BLOWFISH_DECRYPT, src_str->len, &iv_offset, iv_str->x, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
exit:
mbedtls_blowfish_free( &ctx );
@@ -327,7 +337,9 @@
mbedtls_blowfish_setkey( &ctx, key_str->x, key_str->len * 8 );
TEST_ASSERT( mbedtls_blowfish_crypt_ctr( &ctx, src_str->len, &iv_offset, iv_str->x, stream_str, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
exit:
mbedtls_blowfish_free( &ctx );
diff --git a/tests/suites/test_suite_camellia.function b/tests/suites/test_suite_camellia.function
index 4a2d764..4949feb 100644
--- a/tests/suites/test_suite_camellia.function
+++ b/tests/suites/test_suite_camellia.function
@@ -189,7 +189,8 @@
{
TEST_ASSERT( mbedtls_camellia_crypt_ecb( &ctx, MBEDTLS_CAMELLIA_ENCRYPT, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 16, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 16, hex_dst_string->len ) == 0 );
}
exit:
@@ -213,7 +214,8 @@
{
TEST_ASSERT( mbedtls_camellia_crypt_ecb( &ctx, MBEDTLS_CAMELLIA_DECRYPT, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 16, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 16, hex_dst_string->len ) == 0 );
}
exit:
@@ -238,7 +240,9 @@
if( cbc_result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
}
exit:
@@ -263,7 +267,9 @@
if( cbc_result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
}
exit:
@@ -287,7 +293,8 @@
mbedtls_camellia_setkey_enc( &ctx, key_str->x, key_str->len * 8 );
TEST_ASSERT( mbedtls_camellia_crypt_cfb128( &ctx, MBEDTLS_CAMELLIA_ENCRYPT, 16, &iv_offset, iv_str->x, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 16, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 16, hex_dst_string->len ) == 0 );
exit:
mbedtls_camellia_free( &ctx );
@@ -310,7 +317,8 @@
mbedtls_camellia_setkey_enc( &ctx, key_str->x, key_str->len * 8 );
TEST_ASSERT( mbedtls_camellia_crypt_cfb128( &ctx, MBEDTLS_CAMELLIA_DECRYPT, 16, &iv_offset, iv_str->x, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 16, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 16, hex_dst_string->len ) == 0 );
exit:
mbedtls_camellia_free( &ctx );
diff --git a/tests/suites/test_suite_des.function b/tests/suites/test_suite_des.function
index 4ba8a85..625c87a 100644
--- a/tests/suites/test_suite_des.function
+++ b/tests/suites/test_suite_des.function
@@ -28,7 +28,8 @@
mbedtls_des_setkey_enc( &ctx, key_str->x );
TEST_ASSERT( mbedtls_des_crypt_ecb( &ctx, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 8, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 8, hex_dst_string->len ) == 0 );
exit:
mbedtls_des_free( &ctx );
@@ -49,7 +50,8 @@
mbedtls_des_setkey_dec( &ctx, key_str->x );
TEST_ASSERT( mbedtls_des_crypt_ecb( &ctx, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 8, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 8, hex_dst_string->len ) == 0 );
exit:
mbedtls_des_free( &ctx );
@@ -73,7 +75,9 @@
if( cbc_result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
}
exit:
@@ -98,7 +102,9 @@
if( cbc_result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
}
exit:
@@ -126,7 +132,8 @@
TEST_ASSERT( mbedtls_des3_crypt_ecb( &ctx, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 8, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 8, hex_dst_string->len ) == 0 );
exit:
mbedtls_des3_free( &ctx );
@@ -153,7 +160,8 @@
TEST_ASSERT( mbedtls_des3_crypt_ecb( &ctx, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 8, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 8, hex_dst_string->len ) == 0 );
exit:
mbedtls_des3_free( &ctx );
@@ -184,7 +192,9 @@
if( cbc_result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
}
exit:
@@ -216,7 +226,9 @@
if( cbc_result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
}
exit:
diff --git a/tests/suites/test_suite_gcm.function b/tests/suites/test_suite_gcm.function
index ea2c91d..b28d918ba 100644
--- a/tests/suites/test_suite_gcm.function
+++ b/tests/suites/test_suite_gcm.function
@@ -55,8 +55,11 @@
{
TEST_ASSERT( mbedtls_gcm_crypt_and_tag( &ctx, MBEDTLS_GCM_ENCRYPT, src_str->len, iv_str->x, iv_str->len, add_str->x, add_str->len, src_str->x, output, tag_len, tag_output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( tag_output, hex_tag_string->x, tag_len, hex_tag_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( tag_output, hex_tag_string->x,
+ tag_len, hex_tag_string->len ) == 0 );
}
exit:
@@ -94,7 +97,9 @@
{
TEST_ASSERT( ret == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, pt_result->x, src_str->len, pt_result->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, pt_result->x,
+ src_str->len,
+ pt_result->len ) == 0 );
}
}
diff --git a/tests/suites/test_suite_md.function b/tests/suites/test_suite_md.function
index e2d9149..be57829 100644
--- a/tests/suites/test_suite_md.function
+++ b/tests/suites/test_suite_md.function
@@ -145,7 +145,9 @@
TEST_ASSERT ( 0 == mbedtls_md( md_info, src_str, strlen( (char *) src_str ), output ) );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, mbedtls_md_get_size( md_info ), hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ mbedtls_md_get_size( md_info ),
+ hex_hash_string->len ) == 0 );
}
/* END_CASE */
@@ -168,7 +170,8 @@
TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
- mbedtls_md_get_size( md_info ), hex_hash_string->len ) == 0 );
+ mbedtls_md_get_size( md_info ),
+ hex_hash_string->len ) == 0 );
}
/* END_CASE */
@@ -209,14 +212,17 @@
TEST_ASSERT ( 0 == mbedtls_md_update( &ctx, src_str + halfway, len - halfway ) );
TEST_ASSERT ( 0 == mbedtls_md_finish( &ctx, output ) );
TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
- mbedtls_md_get_size( md_info ), hex_hash_string->len) == 0 );
+ mbedtls_md_get_size( md_info ),
+ hex_hash_string->len) == 0 );
/* Test clone */
memset( output, 0x00, 100 );
TEST_ASSERT ( 0 == mbedtls_md_update( &ctx_copy, src_str + halfway, len - halfway ) );
TEST_ASSERT ( 0 == mbedtls_md_finish( &ctx_copy, output ) );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, mbedtls_md_get_size( md_info ), hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ mbedtls_md_get_size( md_info ),
+ hex_hash_string->len ) == 0 );
exit:
mbedtls_md_free( &ctx );
@@ -255,14 +261,18 @@
TEST_ASSERT ( 0 == mbedtls_md_update( &ctx, src_str->x + halfway, src_str->len - halfway) );
TEST_ASSERT ( 0 == mbedtls_md_finish( &ctx, output ) );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, mbedtls_md_get_size( md_info ), hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ mbedtls_md_get_size( md_info ),
+ hex_hash_string->len ) == 0 );
/* Test clone */
memset( output, 0x00, 100 );
TEST_ASSERT ( 0 == mbedtls_md_update( &ctx_copy, src_str->x + halfway, src_str->len - halfway ) );
TEST_ASSERT ( 0 == mbedtls_md_finish( &ctx_copy, output ) );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, mbedtls_md_get_size( md_info ), hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ mbedtls_md_get_size( md_info ),
+ hex_hash_string->len ) == 0 );
exit:
mbedtls_md_free( &ctx );
@@ -289,7 +299,8 @@
TEST_ASSERT ( mbedtls_md_hmac( md_info, key_str->x, key_str->len, src_str->x, src_str->len, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, trunc_size, hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ trunc_size, hex_hash_string->len ) == 0 );
}
/* END_CASE */
@@ -321,7 +332,8 @@
TEST_ASSERT ( 0 == mbedtls_md_hmac_update( &ctx, src_str->x + halfway, src_str->len - halfway ) );
TEST_ASSERT ( 0 == mbedtls_md_hmac_finish( &ctx, output ) );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, trunc_size, hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ trunc_size, hex_hash_string->len ) == 0 );
/* Test again, for reset() */
memset( output, 0x00, 100 );
@@ -331,7 +343,8 @@
TEST_ASSERT ( 0 == mbedtls_md_hmac_update( &ctx, src_str->x + halfway, src_str->len - halfway ) );
TEST_ASSERT ( 0 == mbedtls_md_hmac_finish( &ctx, output ) );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, trunc_size, hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ trunc_size, hex_hash_string->len ) == 0 );
exit:
mbedtls_md_free( &ctx );
@@ -355,6 +368,8 @@
TEST_ASSERT( mbedtls_md_file( md_info, filename, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, mbedtls_md_get_size( md_info ), hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ mbedtls_md_get_size( md_info ),
+ hex_hash_string->len ) == 0 );
}
/* END_CASE */
diff --git a/tests/suites/test_suite_mdx.function b/tests/suites/test_suite_mdx.function
index b6c8d8d..ed2ae58 100644
--- a/tests/suites/test_suite_mdx.function
+++ b/tests/suites/test_suite_mdx.function
@@ -20,7 +20,9 @@
ret = mbedtls_md2_ret( src_str, strlen( (char *) src_str ), output );
TEST_ASSERT( ret == 0 ) ;
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, sizeof output, hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ sizeof output,
+ hex_hash_string->len ) == 0 );
}
/* END_CASE */
@@ -39,7 +41,9 @@
ret = mbedtls_md4_ret( src_str, strlen( (char *) src_str ), output );
TEST_ASSERT( ret == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, sizeof output, hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ sizeof output,
+ hex_hash_string->len ) == 0 );
}
/* END_CASE */
@@ -58,7 +62,9 @@
ret = mbedtls_md5_ret( src_str, strlen( (char *) src_str ), output );
TEST_ASSERT( ret == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, sizeof output, hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ sizeof output,
+ hex_hash_string->len ) == 0 );
}
/* END_CASE */
@@ -77,7 +83,9 @@
ret = mbedtls_ripemd160_ret( src_str, strlen( (char *) src_str ), output );
TEST_ASSERT( ret == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, sizeof output, hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ sizeof output,
+ hex_hash_string->len ) == 0 );
}
/* END_CASE */
diff --git a/tests/suites/test_suite_mpi.function b/tests/suites/test_suite_mpi.function
index a3afb9b..895a087 100644
--- a/tests/suites/test_suite_mpi.function
+++ b/tests/suites/test_suite_mpi.function
@@ -373,7 +373,8 @@
if( result == 0)
{
- TEST_ASSERT( mbedtls_test_hexcmp( buf, input_A->x, buflen, input_A->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( buf, input_A->x,
+ buflen, input_A->len ) == 0 );
}
exit:
@@ -404,7 +405,8 @@
if( result == 0)
{
- TEST_ASSERT( mbedtls_test_hexcmp( buf, input_A->x, buflen, input_A->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( buf, input_A->x,
+ buflen, input_A->len ) == 0 );
}
exit:
@@ -438,7 +440,8 @@
TEST_ASSERT( mbedtls_mpi_write_binary( &X, buf, buflen ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( buf, input_A->x, buflen, input_A->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( buf, input_A->x,
+ buflen, input_A->len ) == 0 );
}
exit:
diff --git a/tests/suites/test_suite_pkcs1_v15.function b/tests/suites/test_suite_pkcs1_v15.function
index 1f65974..d4f31f9 100644
--- a/tests/suites/test_suite_pkcs1_v15.function
+++ b/tests/suites/test_suite_pkcs1_v15.function
@@ -37,7 +37,8 @@
TEST_ASSERT( mbedtls_rsa_pkcs1_encrypt( &ctx, &rnd_buffer_rand, &info, MBEDTLS_RSA_PUBLIC, message_str->len, message_str->x, output ) == result );
if( result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, ctx.len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ ctx.len, result_hex_str->len ) == 0 );
}
exit:
@@ -87,7 +88,9 @@
TEST_ASSERT( mbedtls_rsa_pkcs1_decrypt( &ctx, &rnd_pseudo_rand, &rnd_info, MBEDTLS_RSA_PRIVATE, &output_len, message_str->x, output, 1000 ) == result );
if( result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, output_len, result_hex_str->len) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ output_len,
+ result_hex_str->len) == 0 );
}
}
@@ -287,7 +290,8 @@
if( result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, ctx.len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ ctx.len, result_hex_str->len ) == 0 );
}
exit:
diff --git a/tests/suites/test_suite_pkcs1_v21.function b/tests/suites/test_suite_pkcs1_v21.function
index c3ac92f..86dfd5c 100644
--- a/tests/suites/test_suite_pkcs1_v21.function
+++ b/tests/suites/test_suite_pkcs1_v21.function
@@ -37,7 +37,8 @@
TEST_ASSERT( mbedtls_rsa_pkcs1_encrypt( &ctx, &rnd_buffer_rand, &info, MBEDTLS_RSA_PUBLIC, message_str->len, message_str->x, output ) == result );
if( result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, ctx.len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ ctx.len, result_hex_str->len ) == 0 );
}
exit:
@@ -93,7 +94,9 @@
sizeof( output ) ) == result );
if( result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, output_len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ output_len,
+ result_hex_str->len ) == 0 );
}
}
@@ -146,7 +149,8 @@
if( result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, ctx.len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ ctx.len, result_hex_str->len ) == 0 );
}
exit:
diff --git a/tests/suites/test_suite_pkcs5.function b/tests/suites/test_suite_pkcs5.function
index c334a7a..0b0c937 100644
--- a/tests/suites/test_suite_pkcs5.function
+++ b/tests/suites/test_suite_pkcs5.function
@@ -24,7 +24,8 @@
TEST_ASSERT( mbedtls_pkcs5_pbkdf2_hmac( &ctx, pw_str->x, pw_str->len, salt_str->x, salt_str->len,
it_cnt, key_len, key ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( key, result_key_string->x, key_len, result_key_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( key, result_key_string->x,
+ key_len, result_key_string->len ) == 0 );
exit:
mbedtls_md_free( &ctx );
diff --git a/tests/suites/test_suite_rsa.function b/tests/suites/test_suite_rsa.function
index bbe3638..59d688d 100644
--- a/tests/suites/test_suite_rsa.function
+++ b/tests/suites/test_suite_rsa.function
@@ -506,7 +506,8 @@
if( result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, ctx.len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ ctx.len, result_hex_str->len ) == 0 );
}
exit:
@@ -586,7 +587,8 @@
output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, ctx.len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ ctx.len, result_hex_str->len ) == 0 );
#if defined(MBEDTLS_PKCS1_V15)
/* For PKCS#1 v1.5, there is an alternative way to generate signatures */
@@ -608,7 +610,9 @@
if( res == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, ctx.len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ ctx.len,
+ result_hex_str->len ) == 0 );
}
}
#endif /* MBEDTLS_PKCS1_V15 */
@@ -714,7 +718,8 @@
if( result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, ctx.len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ ctx.len, result_hex_str->len ) == 0 );
}
exit:
@@ -752,7 +757,8 @@
if( result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, ctx.len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ ctx.len, result_hex_str->len ) == 0 );
}
exit:
@@ -800,7 +806,9 @@
if( result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, output_len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ output_len,
+ result_hex_str->len ) == 0 );
}
exit:
@@ -837,7 +845,8 @@
if( result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, ctx.len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ ctx.len, result_hex_str->len ) == 0 );
}
/* And now with the copy */
@@ -852,7 +861,8 @@
if( result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, ctx.len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ ctx.len, result_hex_str->len ) == 0 );
}
exit:
@@ -902,7 +912,9 @@
if( result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, ctx.len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ ctx.len,
+ result_hex_str->len ) == 0 );
}
}
@@ -919,7 +931,9 @@
if( result == 0 )
{
- TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x, ctx2.len, result_hex_str->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, result_hex_str->x,
+ ctx2.len,
+ result_hex_str->len ) == 0 );
}
exit:
diff --git a/tests/suites/test_suite_shax.function b/tests/suites/test_suite_shax.function
index 358054e..6428009 100644
--- a/tests/suites/test_suite_shax.function
+++ b/tests/suites/test_suite_shax.function
@@ -61,7 +61,8 @@
TEST_ASSERT( mbedtls_sha1_ret( src_str->x, src_str->len, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, 20, hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ 20, hex_hash_string->len ) == 0 );
}
/* END_CASE */
@@ -131,7 +132,8 @@
TEST_ASSERT( mbedtls_sha256_ret( src_str->x, src_str->len, output, 1 ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, 28, hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ 28, hex_hash_string->len ) == 0 );
}
/* END_CASE */
@@ -145,7 +147,8 @@
TEST_ASSERT( mbedtls_sha256_ret( src_str->x, src_str->len, output, 0 ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, 32, hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ 32, hex_hash_string->len ) == 0 );
}
/* END_CASE */
@@ -215,7 +218,8 @@
TEST_ASSERT( mbedtls_sha512_ret( src_str->x, src_str->len, output, 1 ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, 48, hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ 48, hex_hash_string->len ) == 0 );
}
/* END_CASE */
@@ -229,7 +233,8 @@
TEST_ASSERT( mbedtls_sha512_ret( src_str->x, src_str->len, output, 0 ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x, 64, hex_hash_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_hash_string->x,
+ 64, hex_hash_string->len ) == 0 );
}
/* END_CASE */
diff --git a/tests/suites/test_suite_xtea.function b/tests/suites/test_suite_xtea.function
index f1926d6..f286e67 100644
--- a/tests/suites/test_suite_xtea.function
+++ b/tests/suites/test_suite_xtea.function
@@ -20,7 +20,8 @@
mbedtls_xtea_setup( &ctx, key_str->x );
TEST_ASSERT( mbedtls_xtea_crypt_ecb( &ctx, MBEDTLS_XTEA_ENCRYPT, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 8, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 8, hex_dst_string->len ) == 0 );
}
/* END_CASE */
@@ -37,7 +38,8 @@
mbedtls_xtea_setup( &ctx, key_str->x );
TEST_ASSERT( mbedtls_xtea_crypt_ecb( &ctx, MBEDTLS_XTEA_DECRYPT, src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, 8, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ 8, hex_dst_string->len ) == 0 );
}
/* END_CASE */
@@ -55,7 +57,9 @@
TEST_ASSERT( mbedtls_xtea_crypt_cbc( &ctx, MBEDTLS_XTEA_ENCRYPT, src_str->len, iv_str->x,
src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
}
/* END_CASE */
@@ -73,7 +77,9 @@
TEST_ASSERT( mbedtls_xtea_crypt_cbc( &ctx, MBEDTLS_XTEA_DECRYPT, src_str->len, iv_str->x,
src_str->x, output ) == 0 );
- TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x, src_str->len, hex_dst_string->len ) == 0 );
+ TEST_ASSERT( mbedtls_test_hexcmp( output, hex_dst_string->x,
+ src_str->len,
+ hex_dst_string->len ) == 0 );
}
/* END_CASE */