XenevaOS
Loading...
Searching...
No Matches
debug_internal.h
Go to the documentation of this file.
1
6/*
7 * Copyright The Mbed TLS Contributors
8 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
9 */
10#ifndef MBEDTLS_DEBUG_INTERNAL_H
11#define MBEDTLS_DEBUG_INTERNAL_H
12
13#include "mbedtls/debug.h"
14
31 const char *file, int line,
32 const char *format, ...) MBEDTLS_PRINTF_ATTRIBUTE(5, 6);
33
50 const char *file, int line,
51 const char *text, int ret);
52
71 const char *file, int line, const char *text,
72 const unsigned char *buf, size_t len);
73
74#if defined(MBEDTLS_BIGNUM_C)
91void mbedtls_debug_print_mpi(const mbedtls_ssl_context *ssl, int level,
92 const char *file, int line,
93 const char *text, const mbedtls_mpi *X);
94#endif
95
96#if defined(MBEDTLS_ECP_LIGHT)
113void mbedtls_debug_print_ecp(const mbedtls_ssl_context *ssl, int level,
114 const char *file, int line,
115 const char *text, const mbedtls_ecp_point *X);
116#endif
117
118#if defined(MBEDTLS_X509_CRT_PARSE_C) && !defined(MBEDTLS_X509_REMOVE_INFO)
134void mbedtls_debug_print_crt(const mbedtls_ssl_context *ssl, int level,
135 const char *file, int line,
136 const char *text, const mbedtls_x509_crt *crt);
137#endif
138
139/* Note: the MBEDTLS_ECDH_C guard here is mandatory because this debug function
140 only works for the built-in implementation. */
141#if defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_ANY_ENABLED) && \
142 defined(MBEDTLS_ECDH_C)
143typedef enum {
144 MBEDTLS_DEBUG_ECDH_Q,
145 MBEDTLS_DEBUG_ECDH_QP,
146 MBEDTLS_DEBUG_ECDH_Z,
147} mbedtls_debug_ecdh_attr;
148
165void mbedtls_debug_printf_ecdh(const mbedtls_ssl_context *ssl, int level,
166 const char *file, int line,
167 const mbedtls_ecdh_context *ecdh,
168 mbedtls_debug_ecdh_attr attr);
169#endif /* MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_ANY_ENABLED &&
170 MBEDTLS_ECDH_C */
171
172#endif /* MBEDTLS_DEBUG_INTERNAL_H */
Functions for controlling and providing debug output from the library.
#define MBEDTLS_PRINTF_ATTRIBUTE(string_index, first_to_check)
Definition debug.h:96
#define X(a)
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...
void 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...
void mbedtls_debug_print_msg(const mbedtls_ssl_context *ssl, int level, const char *file, int line, const char *format,...) MBEDTLS_PRINTF_ATTRIBUTE(5
Print a message to the debug output. This function is always used through the MBEDTLS_SSL_DEBUG_MSG()...
const char const char * format
Definition drm_print.h:516
const char * level
Definition drm_print.h:515
size_t len
Definition initial.c:23
Definition fs.h:142
The ECDH context structure.
Definition ecdh.h:105
The ECP point structure, in Jacobian coordinates.
Definition ecp.h:158
MPI structure.
Definition bignum.h:208
Definition ssl.h:1731
Definition x509_crt.h:41