mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-10-26 00:37:41 +03: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:
@@ -40,7 +40,7 @@ void mbedtls_test_platform_teardown( void )
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
||||
}
|
||||
|
||||
int unhexify( unsigned char *obuf, const char *ibuf )
|
||||
int mbedtls_test_unhexify( unsigned char *obuf, const char *ibuf )
|
||||
{
|
||||
unsigned char c, c2;
|
||||
int len = strlen( ibuf ) / 2;
|
||||
@@ -74,7 +74,9 @@ int unhexify( unsigned char *obuf, const char *ibuf )
|
||||
return len;
|
||||
}
|
||||
|
||||
void hexify( unsigned char *obuf, const unsigned char *ibuf, int len )
|
||||
void mbedtls_test_hexify( unsigned char *obuf,
|
||||
const unsigned char *ibuf,
|
||||
int len )
|
||||
{
|
||||
unsigned char l, h;
|
||||
|
||||
@@ -123,7 +125,7 @@ unsigned char *unhexify_alloc( const char *ibuf, size_t *olen )
|
||||
obuf = mbedtls_calloc( 1, *olen );
|
||||
TEST_HELPER_ASSERT( obuf != NULL );
|
||||
|
||||
(void) unhexify( obuf, ibuf );
|
||||
(void) mbedtls_test_unhexify( obuf, ibuf );
|
||||
|
||||
return( obuf );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user