mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-01-07 15:09:28 +01:00
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>
This commit is contained in:
parent
d239794deb
commit
9fde353f68
15 changed files with 185 additions and 76 deletions
|
|
@ -28,7 +28,8 @@ void des_encrypt_ecb( data_t * key_str, data_t * src_str,
|
|||
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 @@ void des_decrypt_ecb( data_t * key_str, data_t * src_str,
|
|||
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 @@ void des_encrypt_cbc( data_t * key_str, data_t * iv_str,
|
|||
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 @@ void des_decrypt_cbc( data_t * key_str, data_t * iv_str,
|
|||
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 @@ void des3_encrypt_ecb( int key_count, data_t * key_str,
|
|||
|
||||
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 @@ void des3_decrypt_ecb( int key_count, data_t * key_str,
|
|||
|
||||
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 @@ void des3_encrypt_cbc( int key_count, data_t * key_str,
|
|||
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 @@ void des3_decrypt_cbc( int key_count, data_t * key_str,
|
|||
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue