mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-02-18 16:33:01 +00:00
tests: Add mbedtls_test_ prefix to *hexify functions
Add mbedtls_test_ prefix to hexify() and unhexify()
test helper functions.
Command to change *.function files:
find . -name "*.function" -exec awk -i inplace \
'{sub(/(un|)hexify\>/,"mbedtls_test_&")}1' {} \;
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
@@ -1087,15 +1087,15 @@ void test_vec_crypt( int cipher_id, int operation, char *hex_key,
|
||||
TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx,
|
||||
mbedtls_cipher_info_from_type( cipher_id ) ) );
|
||||
|
||||
key_len = unhexify( key, hex_key );
|
||||
inputlen = unhexify( input, hex_input );
|
||||
resultlen = unhexify( result, hex_result );
|
||||
key_len = mbedtls_test_unhexify( key, hex_key );
|
||||
inputlen = mbedtls_test_unhexify( input, hex_input );
|
||||
resultlen = mbedtls_test_unhexify( result, hex_result );
|
||||
|
||||
TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx, key, 8 * key_len, operation ) );
|
||||
if( MBEDTLS_MODE_CBC == ctx.cipher_info->mode )
|
||||
TEST_ASSERT( 0 == mbedtls_cipher_set_padding_mode( &ctx, MBEDTLS_PADDING_NONE ) );
|
||||
|
||||
iv_len = unhexify( iv, hex_iv );
|
||||
iv_len = mbedtls_test_unhexify( iv, hex_iv );
|
||||
|
||||
TEST_ASSERT( finish_result == mbedtls_cipher_crypt( &ctx, iv_len ? iv : NULL,
|
||||
iv_len, input, inputlen,
|
||||
|
||||
Reference in New Issue
Block a user