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 ) 68 #if defined(MBEDTLS_ECDH_C) 69 #define MBEDTLS_SSL_DEBUG_ECDH( level, ecdh, attr ) \ 70 mbedtls_debug_printf_ecdh( ssl, level, __FILE__, __LINE__, ecdh, attr ) 75 #define MBEDTLS_SSL_DEBUG_MSG( level, args ) do { } while( 0 ) 76 #define MBEDTLS_SSL_DEBUG_RET( level, text, ret ) do { } while( 0 ) 77 #define MBEDTLS_SSL_DEBUG_BUF( level, text, buf, len ) do { } while( 0 ) 78 #define MBEDTLS_SSL_DEBUG_MPI( level, text, X ) do { } while( 0 ) 79 #define MBEDTLS_SSL_DEBUG_ECP( level, text, X ) do { } while( 0 ) 80 #define MBEDTLS_SSL_DEBUG_CRT( level, text, crt ) do { } while( 0 ) 81 #define MBEDTLS_SSL_DEBUG_ECDH( level, ecdh, attr ) do { } while( 0 ) 122 const char *file,
int line,
123 const char *format, ... );
141 const char *file,
int line,
142 const char *text,
int ret );
162 const char *file,
int line,
const char *text,
163 const unsigned char *buf,
size_t len );
165 #if defined(MBEDTLS_BIGNUM_C) 183 const char *file,
int line,
187 #if defined(MBEDTLS_ECP_C) 205 const char *file,
int line,
209 #if defined(MBEDTLS_X509_CRT_PARSE_C) 226 const char *file,
int line,
230 #if defined(MBEDTLS_ECDH_C) 233 MBEDTLS_DEBUG_ECDH_Q,
234 MBEDTLS_DEBUG_ECDH_QP,
235 MBEDTLS_DEBUG_ECDH_Z,
236 } mbedtls_debug_ecdh_attr;
255 const char *file,
int line,
257 mbedtls_debug_ecdh_attr attr );
This file provides an API for Elliptic Curves over GF(P) (ECP).
Configuration options (set of defines)
void mbedtls_debug_set_threshold(int threshold)
Set the threshold error level to handle globally all debug output. Debug messages that have a level o...
void mbedtls_debug_print_ret(const mbedtls_ssl_context *ssl, int level, const char *file, int line, const char *text, int ret)
Print the return value of a function to the debug output. This function is always used through the MB...
The ECDH context structure.
Definition: ecdh.h:104
void mbedtls_debug_print_msg(const mbedtls_ssl_context *ssl, int level, const char *file, int line, const char *format,...)
Print a message to the debug output. This function is always used through the MBEDTLS_SSL_DEBUG_MSG()...
MPI structure.
Definition: bignum.h:180
Definition: x509_crt.h:53
The ECP point structure, in Jacobian coordinates.
Definition: ecp.h:118
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)
Output a buffer of size len bytes to the debug output. This function is always used through the MBEDT...