mbed TLS v2.0.0
Macros | Functions
debug.h File Reference

Debug functions. More...

#include "config.h"
#include "ssl.h"
#include "ecp.h"
Include dependency graph for debug.h:

Go to the source code of this file.

Macros

#define MBEDTLS_DEBUG_STRIP_PARENS(...)   __VA_ARGS__
 
#define MBEDTLS_SSL_DEBUG_MSG(level, args)
 
#define MBEDTLS_SSL_DEBUG_RET(level, text, ret)   mbedtls_debug_print_ret( ssl, level, __FILE__, __LINE__, text, ret )
 
#define MBEDTLS_SSL_DEBUG_BUF(level, text, buf, len)   mbedtls_debug_print_buf( ssl, level, __FILE__, __LINE__, text, buf, len )
 
#define MBEDTLS_SSL_DEBUG_MPI(level, text, X)   mbedtls_debug_print_mpi( ssl, level, __FILE__, __LINE__, text, X )
 
#define MBEDTLS_SSL_DEBUG_ECP(level, text, X)   mbedtls_debug_print_ecp( ssl, level, __FILE__, __LINE__, text, X )
 
#define MBEDTLS_SSL_DEBUG_CRT(level, text, crt)   mbedtls_debug_print_crt( ssl, level, __FILE__, __LINE__, text, crt )
 

Functions

void mbedtls_debug_set_threshold (int threshold)
 Set the level threshold to handle globally. More...
 
void mbedtls_debug_print_msg (const mbedtls_ssl_context *ssl, int level, const char *file, int line, const char *format,...)
 
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_buf (const mbedtls_ssl_context *ssl, int level, const char *file, int line, const char *text, const unsigned char *buf, size_t len)
 
void mbedtls_debug_print_mpi (const mbedtls_ssl_context *ssl, int level, const char *file, int line, const char *text, const mbedtls_mpi *X)
 
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_crt (const mbedtls_ssl_context *ssl, int level, const char *file, int line, const char *text, const mbedtls_x509_crt *crt)
 

Detailed Description

Debug functions.

Copyright (C) 2006-2011, ARM Limited, All Rights Reserved

This file is part of mbed TLS (https://tls.mbed.org)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Definition in file debug.h.

Macro Definition Documentation

#define MBEDTLS_DEBUG_STRIP_PARENS (   ...)    __VA_ARGS__

Definition at line 41 of file debug.h.

#define MBEDTLS_SSL_DEBUG_BUF (   level,
  text,
  buf,
  len 
)    mbedtls_debug_print_buf( ssl, level, __FILE__, __LINE__, text, buf, len )

Definition at line 50 of file debug.h.

#define MBEDTLS_SSL_DEBUG_CRT (   level,
  text,
  crt 
)    mbedtls_debug_print_crt( ssl, level, __FILE__, __LINE__, text, crt )

Definition at line 64 of file debug.h.

#define MBEDTLS_SSL_DEBUG_ECP (   level,
  text,
 
)    mbedtls_debug_print_ecp( ssl, level, __FILE__, __LINE__, text, X )

Definition at line 59 of file debug.h.

#define MBEDTLS_SSL_DEBUG_MPI (   level,
  text,
 
)    mbedtls_debug_print_mpi( ssl, level, __FILE__, __LINE__, text, X )

Definition at line 54 of file debug.h.

#define MBEDTLS_SSL_DEBUG_MSG (   level,
  args 
)
Value:
mbedtls_debug_print_msg( ssl, level, __FILE__, __LINE__, \
void mbedtls_debug_print_msg(const mbedtls_ssl_context *ssl, int level, const char *file, int line, const char *format,...)
#define MBEDTLS_DEBUG_STRIP_PARENS(...)
Definition: debug.h:41

Definition at line 43 of file debug.h.

#define MBEDTLS_SSL_DEBUG_RET (   level,
  text,
  ret 
)    mbedtls_debug_print_ret( ssl, level, __FILE__, __LINE__, text, ret )

Definition at line 47 of file debug.h.

Function Documentation

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 
)
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_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_mpi ( const mbedtls_ssl_context ssl,
int  level,
const char *  file,
int  line,
const char *  text,
const mbedtls_mpi X 
)
void mbedtls_debug_print_msg ( const mbedtls_ssl_context ssl,
int  level,
const char *  file,
int  line,
const char *  format,
  ... 
)
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_set_threshold ( int  threshold)

Set the level threshold to handle globally.

Messages that have a level over the threshold value are ignored. (Default value: 0 (No debug))

Parameters
thresholdmaximum level of messages to pass on