24 #ifndef MBEDTLS_DEBUG_H
25 #define MBEDTLS_DEBUG_H
27 #if !defined(MBEDTLS_CONFIG_FILE)
30 #include MBEDTLS_CONFIG_FILE
35 #if defined(MBEDTLS_ECP_C)
39 #if defined(MBEDTLS_DEBUG_C)
41 #define MBEDTLS_DEBUG_STRIP_PARENS( ... ) __VA_ARGS__
43 #define MBEDTLS_SSL_DEBUG_MSG( level, args ) \
44 mbedtls_debug_print_msg( ssl, level, __FILE__, __LINE__, \
45 MBEDTLS_DEBUG_STRIP_PARENS args )
47 #define MBEDTLS_SSL_DEBUG_RET( level, text, ret ) \
48 mbedtls_debug_print_ret( ssl, level, __FILE__, __LINE__, text, ret )
50 #define MBEDTLS_SSL_DEBUG_BUF( level, text, buf, len ) \
51 mbedtls_debug_print_buf( ssl, level, __FILE__, __LINE__, text, buf, len )
53 #if defined(MBEDTLS_BIGNUM_C)
54 #define MBEDTLS_SSL_DEBUG_MPI( level, text, X ) \
55 mbedtls_debug_print_mpi( ssl, level, __FILE__, __LINE__, text, X )
58 #if defined(MBEDTLS_ECP_C)
59 #define MBEDTLS_SSL_DEBUG_ECP( level, text, X ) \
60 mbedtls_debug_print_ecp( ssl, level, __FILE__, __LINE__, text, X )
63 #if defined(MBEDTLS_X509_CRT_PARSE_C)
64 #define MBEDTLS_SSL_DEBUG_CRT( level, text, crt ) \
65 mbedtls_debug_print_crt( ssl, level, __FILE__, __LINE__, text, crt )
70 #define MBEDTLS_SSL_DEBUG_MSG( level, args ) do { } while( 0 )
71 #define MBEDTLS_SSL_DEBUG_RET( level, text, ret ) do { } while( 0 )
72 #define MBEDTLS_SSL_DEBUG_BUF( level, text, buf, len ) do { } while( 0 )
73 #define MBEDTLS_SSL_DEBUG_MPI( level, text, X ) do { } while( 0 )
74 #define MBEDTLS_SSL_DEBUG_ECP( level, text, X ) do { } while( 0 )
75 #define MBEDTLS_SSL_DEBUG_CRT( level, text, crt ) do { } while( 0 )
93 const char *file,
int line,
94 const char *format, ... );
97 const char *file,
int line,
98 const char *text,
int ret );
101 const char *file,
int line,
const char *text,
102 const unsigned char *buf,
size_t len );
104 #if defined(MBEDTLS_BIGNUM_C)
106 const char *file,
int line,
110 #if defined(MBEDTLS_ECP_C)
112 const char *file,
int line,
116 #if defined(MBEDTLS_X509_CRT_PARSE_C)
118 const char *file,
int line,
void mbedtls_debug_print_crt(const mbedtls_ssl_context *ssl, int level, const char *file, int line, const char *text, const mbedtls_x509_crt *crt)
void mbedtls_debug_print_mpi(const mbedtls_ssl_context *ssl, int level, const char *file, int line, const char *text, const mbedtls_mpi *X)
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_ecp(const mbedtls_ssl_context *ssl, int level, const char *file, int line, const char *text, const mbedtls_ecp_point *X)
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)