23 #ifndef MBEDTLS_DEBUG_H
24 #define MBEDTLS_DEBUG_H
26 #if !defined(MBEDTLS_CONFIG_FILE)
29 #include MBEDTLS_CONFIG_FILE
34 #if defined(MBEDTLS_ECP_C)
38 #if defined(MBEDTLS_DEBUG_C)
40 #define MBEDTLS_DEBUG_STRIP_PARENS( ... ) __VA_ARGS__
42 #define MBEDTLS_SSL_DEBUG_MSG( level, args ) \
43 mbedtls_debug_print_msg( ssl, level, __FILE__, __LINE__, \
44 MBEDTLS_DEBUG_STRIP_PARENS args )
46 #define MBEDTLS_SSL_DEBUG_RET( level, text, ret ) \
47 mbedtls_debug_print_ret( ssl, level, __FILE__, __LINE__, text, ret )
49 #define MBEDTLS_SSL_DEBUG_BUF( level, text, buf, len ) \
50 mbedtls_debug_print_buf( ssl, level, __FILE__, __LINE__, text, buf, len )
52 #if defined(MBEDTLS_BIGNUM_C)
53 #define MBEDTLS_SSL_DEBUG_MPI( level, text, X ) \
54 mbedtls_debug_print_mpi( ssl, level, __FILE__, __LINE__, text, X )
57 #if defined(MBEDTLS_ECP_C)
58 #define MBEDTLS_SSL_DEBUG_ECP( level, text, X ) \
59 mbedtls_debug_print_ecp( ssl, level, __FILE__, __LINE__, text, X )
62 #if defined(MBEDTLS_X509_CRT_PARSE_C)
63 #define MBEDTLS_SSL_DEBUG_CRT( level, text, crt ) \
64 mbedtls_debug_print_crt( ssl, level, __FILE__, __LINE__, text, crt )
69 #define MBEDTLS_SSL_DEBUG_MSG( level, args ) do { } while( 0 )
70 #define MBEDTLS_SSL_DEBUG_RET( level, text, ret ) do { } while( 0 )
71 #define MBEDTLS_SSL_DEBUG_BUF( level, text, buf, len ) do { } while( 0 )
72 #define MBEDTLS_SSL_DEBUG_MPI( level, text, X ) do { } while( 0 )
73 #define MBEDTLS_SSL_DEBUG_ECP( level, text, X ) do { } while( 0 )
74 #define MBEDTLS_SSL_DEBUG_CRT( level, text, crt ) do { } while( 0 )
92 const char *file,
int line,
93 const char *format, ... );
96 const char *file,
int line,
97 const char *text,
int ret );
100 const char *file,
int line,
const char *text,
101 const unsigned char *buf,
size_t len );
103 #if defined(MBEDTLS_BIGNUM_C)
105 const char *file,
int line,
109 #if defined(MBEDTLS_ECP_C)
111 const char *file,
int line,
115 #if defined(MBEDTLS_X509_CRT_PARSE_C)
117 const char *file,
int line,
Elliptic curves over GF(p)
Compatibility names (set of defines)
void mbedtls_debug_set_threshold(int threshold)
Set the level threshold to handle globally.
void mbedtls_debug_print_ret(const mbedtls_ssl_context *ssl, int level, const char *file, int line, const char *text, int ret)
void mbedtls_debug_print_msg(const mbedtls_ssl_context *ssl, int level, const char *file, int line, const char *format,...)
Container for an X.509 certificate.
ECP point structure (jacobian coordinates)
void mbedtls_debug_print_buf(const mbedtls_ssl_context *ssl, int level, const char *file, int line, const char *text, const unsigned char *buf, size_t len)