mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-01-06 06:28:56 +01:00
tests: Add mbedtls_test_ prefix to hexcmp()
Add mbedtls_test_ prefix to hexcmp() test helper
function.
Command to change *.function files:
find . -name "*.function" -exec awk -i inplace \
'{sub(/hexcmp\>/,"mbedtls_test_&")}1' {} \;
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
a586099fd3
commit
d239794deb
17 changed files with 77 additions and 79 deletions
|
|
@ -36,8 +36,7 @@ void pkcs1_rsaes_v15_encrypt( int mod, int radix_N, char * input_N,
|
|||
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( 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:
|
||||
|
|
@ -83,7 +82,7 @@ void pkcs1_rsaes_v15_decrypt( int mod, int radix_P, char * input_P,
|
|||
if( result == 0 )
|
||||
{
|
||||
|
||||
TEST_ASSERT( 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:
|
||||
|
|
@ -282,7 +281,7 @@ void pkcs1_rsassa_v15_sign( int mod, int radix_P, char * input_P, int radix_Q,
|
|||
if( result == 0 )
|
||||
{
|
||||
|
||||
TEST_ASSERT( 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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue