2021-12-16 09:04:58 +00:00
|
|
|
/**
|
|
|
|
* \file ssl_debug_helpers.h
|
|
|
|
*
|
|
|
|
* \brief Automatically generated helper functions for debugging
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* Copyright The Mbed TLS Contributors
|
2023-11-02 19:47:20 +00:00
|
|
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
2021-12-16 09:04:58 +00:00
|
|
|
*/
|
|
|
|
|
2021-12-15 11:53:34 +00:00
|
|
|
#ifndef MBEDTLS_SSL_DEBUG_HELPERS_H
|
|
|
|
#define MBEDTLS_SSL_DEBUG_HELPERS_H
|
|
|
|
|
2024-10-04 09:36:54 +00:00
|
|
|
#include "ssl_misc.h"
|
2021-12-15 11:53:34 +00:00
|
|
|
|
|
|
|
#if defined(MBEDTLS_DEBUG_C)
|
|
|
|
|
|
|
|
#include "mbedtls/ssl.h"
|
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
const char *mbedtls_ssl_states_str(mbedtls_ssl_states in);
|
2021-12-15 11:53:34 +00:00
|
|
|
|
2024-02-14 11:01:50 +00:00
|
|
|
#if defined(MBEDTLS_SSL_EARLY_DATA) && defined(MBEDTLS_SSL_CLI_C)
|
|
|
|
const char *mbedtls_ssl_early_data_status_str(mbedtls_ssl_early_data_status in);
|
2024-03-03 14:03:22 +00:00
|
|
|
const char *mbedtls_ssl_early_data_state_str(mbedtls_ssl_early_data_state in);
|
2024-02-14 11:01:50 +00:00
|
|
|
#endif
|
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
const char *mbedtls_ssl_protocol_version_str(mbedtls_ssl_protocol_version in);
|
2022-01-13 12:46:05 +00:00
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
const char *mbedtls_tls_prf_types_str(mbedtls_tls_prf_types in);
|
2021-12-15 11:53:34 +00:00
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
const char *mbedtls_ssl_key_export_type_str(mbedtls_ssl_key_export_type in);
|
2021-12-15 11:53:34 +00:00
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
const char *mbedtls_ssl_sig_alg_to_str(uint16_t in);
|
2021-12-15 11:53:34 +00:00
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
const char *mbedtls_ssl_named_group_to_str(uint16_t in);
|
2022-04-11 13:04:47 +00:00
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
const char *mbedtls_ssl_get_extension_name(unsigned int extension_type);
|
2022-10-31 04:48:30 +00:00
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
void mbedtls_ssl_print_extensions(const mbedtls_ssl_context *ssl,
|
2022-11-08 13:30:21 +00:00
|
|
|
int level, const char *file, int line,
|
2023-01-11 13:50:10 +00:00
|
|
|
int hs_msg_type, uint32_t extensions_mask,
|
|
|
|
const char *extra);
|
|
|
|
|
|
|
|
void mbedtls_ssl_print_extension(const mbedtls_ssl_context *ssl,
|
|
|
|
int level, const char *file, int line,
|
|
|
|
int hs_msg_type, unsigned int extension_type,
|
|
|
|
const char *extra_msg0, const char *extra_msg1);
|
|
|
|
|
2023-01-12 06:37:24 +00:00
|
|
|
#if defined(MBEDTLS_SSL_PROTO_TLS1_3) && defined(MBEDTLS_SSL_SESSION_TICKETS)
|
2023-01-16 03:28:49 +00:00
|
|
|
void mbedtls_ssl_print_ticket_flags(const mbedtls_ssl_context *ssl,
|
|
|
|
int level, const char *file, int line,
|
|
|
|
unsigned int flags);
|
2023-01-12 06:37:24 +00:00
|
|
|
#endif /* MBEDTLS_SSL_PROTO_TLS1_3 && MBEDTLS_SSL_SESSION_TICKETS */
|
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
#define MBEDTLS_SSL_PRINT_EXTS(level, hs_msg_type, extensions_mask) \
|
|
|
|
mbedtls_ssl_print_extensions(ssl, level, __FILE__, __LINE__, \
|
|
|
|
hs_msg_type, extensions_mask, NULL)
|
|
|
|
|
|
|
|
#define MBEDTLS_SSL_PRINT_EXT(level, hs_msg_type, extension_type, extra) \
|
|
|
|
mbedtls_ssl_print_extension(ssl, level, __FILE__, __LINE__, \
|
|
|
|
hs_msg_type, extension_type, \
|
|
|
|
extra, NULL)
|
2023-01-12 06:37:24 +00:00
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_PROTO_TLS1_3) && defined(MBEDTLS_SSL_SESSION_TICKETS)
|
2023-01-16 03:28:49 +00:00
|
|
|
#define MBEDTLS_SSL_PRINT_TICKET_FLAGS(level, flags) \
|
|
|
|
mbedtls_ssl_print_ticket_flags(ssl, level, __FILE__, __LINE__, flags)
|
2023-01-12 06:37:24 +00:00
|
|
|
#endif
|
|
|
|
|
2022-08-04 08:33:14 +00:00
|
|
|
#else
|
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
#define MBEDTLS_SSL_PRINT_EXTS(level, hs_msg_type, extension_mask)
|
2022-08-04 08:33:14 +00:00
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
#define MBEDTLS_SSL_PRINT_EXT(level, hs_msg_type, extension_type, extra)
|
2022-10-31 04:48:30 +00:00
|
|
|
|
2023-01-12 06:37:24 +00:00
|
|
|
#if defined(MBEDTLS_SSL_PROTO_TLS1_3) && defined(MBEDTLS_SSL_SESSION_TICKETS)
|
2023-01-16 03:28:49 +00:00
|
|
|
#define MBEDTLS_SSL_PRINT_TICKET_FLAGS(level, flags)
|
2023-01-12 06:37:24 +00:00
|
|
|
#endif
|
|
|
|
|
2022-10-31 04:48:30 +00:00
|
|
|
#endif /* MBEDTLS_DEBUG_C */
|
2022-08-04 08:33:14 +00:00
|
|
|
|
2022-10-31 04:48:30 +00:00
|
|
|
#endif /* MBEDTLS_SSL_DEBUG_HELPERS_H */
|