mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
Adapt programs to the new debug API
This commit is contained in:
parent
fd474233c8
commit
61ee351af4
10 changed files with 56 additions and 36 deletions
|
|
@ -154,13 +154,14 @@ struct options
|
|||
int force_ciphersuite[2]; /* protocol/ciphersuite to use, or all */
|
||||
} opt;
|
||||
|
||||
static void my_debug( void *ctx, int level, const char *str )
|
||||
static void my_debug( void *ctx, int level,
|
||||
const char *file, int line,
|
||||
const char *str )
|
||||
{
|
||||
if( level < opt.debug_level )
|
||||
{
|
||||
mbedtls_fprintf( (FILE *) ctx, "%s", str );
|
||||
fflush( (FILE *) ctx );
|
||||
}
|
||||
((void) level);
|
||||
|
||||
mbedtls_fprintf( (FILE *) ctx, "%s:%04d: %s", file, line, str );
|
||||
fflush( (FILE *) ctx );
|
||||
}
|
||||
|
||||
static int do_handshake( mbedtls_ssl_context *ssl )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue