1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00

Intermediate hexify out change

This commit is contained in:
Azim Khan
2017-05-30 14:23:15 +01:00
committed by Mohammad Azim Khan
parent 9079170f6e
commit f1aaec9888
39 changed files with 780 additions and 1563 deletions

View File

@ -48,8 +48,8 @@ void string_debug(void *data, int level, const char *file, int line, const char
*/
/* BEGIN_CASE */
void debug_print_msg_threshold( int threshold, int level, char *file, int line,
char *result_str )
void debug_print_msg_threshold( int threshold, int level, char * file,
int line, char * result_str )
{
mbedtls_ssl_context ssl;
mbedtls_ssl_config conf;
@ -77,8 +77,8 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_debug_print_ret( char *file, int line, char *text, int value,
char *result_str )
void mbedtls_debug_print_ret( char * file, int line, char * text, int value,
char * result_str )
{
mbedtls_ssl_context ssl;
mbedtls_ssl_config conf;
@ -104,28 +104,24 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_debug_print_buf( char *file, int line, char *text,
char *data_string, char *result_str )
void mbedtls_debug_print_buf( char * file, int line, char * text,
uint8_t * data, uint32_t data_len,
char * result_str )
{
unsigned char data[10000];
mbedtls_ssl_context ssl;
mbedtls_ssl_config conf;
struct buffer_data buffer;
size_t data_len;
mbedtls_ssl_init( &ssl );
mbedtls_ssl_config_init( &conf );
memset( &data, 0, sizeof( data ) );
memset( buffer.buf, 0, 2000 );
buffer.ptr = buffer.buf;
data_len = unhexify( data, data_string );
TEST_ASSERT( mbedtls_ssl_setup( &ssl, &conf ) == 0 );
mbedtls_ssl_conf_dbg( &conf, string_debug, &buffer);
mbedtls_debug_print_buf( &ssl, 0, file, line, text, data, data_len );
TEST_ASSERT( strcmp( buffer.buf, result_str ) == 0 );
@ -136,8 +132,8 @@ exit:
/* END_CASE */
/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C */
void mbedtls_debug_print_crt( char *crt_file, char *file, int line,
char *prefix, char *result_str )
void mbedtls_debug_print_crt( char * crt_file, char * file, int line,
char * prefix, char * result_str )
{
mbedtls_x509_crt crt;
mbedtls_ssl_context ssl;
@ -167,8 +163,8 @@ exit:
/* END_CASE */
/* BEGIN_CASE depends_on:MBEDTLS_BIGNUM_C */
void mbedtls_debug_print_mpi( int radix, char *value, char *file, int line,
char *prefix, char *result_str )
void mbedtls_debug_print_mpi( int radix, char * value, char * file, int line,
char * prefix, char * result_str )
{
mbedtls_ssl_context ssl;
mbedtls_ssl_config conf;