1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-14 14:21:50 +03:00
Files
.github
3rdparty
ChangeLog.d
cmake
configs
docs
doxygen
include
library
.gitignore
CMakeLists.txt
Makefile
aes.c
aesce.c
aesce.h
aesni.c
aesni.h
alignment.h
aria.c
asn1parse.c
asn1write.c
base64.c
base64_internal.h
bignum.c
bignum_core.c
bignum_core.h
bignum_mod.c
bignum_mod.h
bignum_mod_raw.c
bignum_mod_raw.h
bignum_mod_raw_invasive.h
bn_mul.h
camellia.c
ccm.c
chacha20.c
chachapoly.c
check_crypto_config.h
cipher.c
cipher_wrap.c
cipher_wrap.h
cmac.c
common.h
constant_time.c
constant_time_impl.h
constant_time_internal.h
ctr_drbg.c
debug.c
des.c
dhm.c
ecdh.c
ecdsa.c
ecjpake.c
ecp.c
ecp_curves.c
ecp_curves_new.c
ecp_internal_alt.h
ecp_invasive.h
entropy.c
entropy_poll.c
entropy_poll.h
gcm.c
hkdf.c
hmac_drbg.c
lmots.c
lmots.h
lms.c
md.c
md5.c
md_psa.h
md_wrap.h
memory_buffer_alloc.c
mps_common.h
mps_error.h
mps_reader.c
mps_reader.h
mps_trace.c
mps_trace.h
net_sockets.c
nist_kw.c
oid.c
padlock.c
padlock.h
pem.c
pk.c
pk_internal.h
pk_wrap.c
pk_wrap.h
pkcs12.c
pkcs5.c
pkcs7.c
pkparse.c
pkwrite.c
pkwrite.h
platform.c
platform_util.c
poly1305.c
psa_crypto.c
psa_crypto_aead.c
psa_crypto_aead.h
psa_crypto_cipher.c
psa_crypto_cipher.h
psa_crypto_client.c
psa_crypto_core.h
psa_crypto_core_common.h
psa_crypto_driver_wrappers.h
psa_crypto_ecp.c
psa_crypto_ecp.h
psa_crypto_ffdh.c
psa_crypto_ffdh.h
psa_crypto_hash.c
psa_crypto_hash.h
psa_crypto_invasive.h
psa_crypto_its.h
psa_crypto_mac.c
psa_crypto_mac.h
psa_crypto_pake.c
psa_crypto_pake.h
psa_crypto_random_impl.h
psa_crypto_rsa.c
psa_crypto_rsa.h
psa_crypto_se.c
psa_crypto_se.h
psa_crypto_slot_management.c
psa_crypto_slot_management.h
psa_crypto_storage.c
psa_crypto_storage.h
psa_its_file.c
psa_util.c
psa_util_internal.h
ripemd160.c
rsa.c
rsa_alt_helpers.c
rsa_alt_helpers.h
sha1.c
sha256.c
sha3.c
sha512.c
ssl_cache.c
ssl_ciphersuites.c
ssl_client.c
ssl_client.h
ssl_cookie.c
ssl_debug_helpers.h
ssl_misc.h
ssl_msg.c
ssl_ticket.c
ssl_tls.c
ssl_tls12_client.c
ssl_tls12_server.c
ssl_tls13_client.c
ssl_tls13_generic.c
ssl_tls13_invasive.h
ssl_tls13_keys.c
ssl_tls13_keys.h
ssl_tls13_server.c
threading.c
timing.c
version.c
x509.c
x509_create.c
x509_crl.c
x509_crt.c
x509_csr.c
x509write.c
x509write_crt.c
x509write_csr.c
programs
scripts
tests
visualc
.gitattributes
.gitignore
.globalrc
.mypy.ini
.pylintrc
.readthedocs.yaml
.travis.yml
.uncrustify.cfg
BRANCHES.md
BUGS.md
CMakeLists.txt
CONTRIBUTING.md
ChangeLog
DartConfiguration.tcl
LICENSE
Makefile
README.md
SECURITY.md
SUPPORT.md
dco.txt
mbedtls/library/ssl_debug_helpers.h
Pengyu Lv 4938a566bf refine ticket_flags printing helper
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-01-16 11:28:49 +08:00

91 lines
3.3 KiB
C

/**
* \file ssl_debug_helpers.h
*
* \brief Automatically generated helper functions for debugging
*/
/*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MBEDTLS_SSL_DEBUG_HELPERS_H
#define MBEDTLS_SSL_DEBUG_HELPERS_H
#include "common.h"
#if defined(MBEDTLS_DEBUG_C)
#include "mbedtls/ssl.h"
#include "ssl_misc.h"
const char *mbedtls_ssl_states_str(mbedtls_ssl_states in);
const char *mbedtls_ssl_protocol_version_str(mbedtls_ssl_protocol_version in);
const char *mbedtls_tls_prf_types_str(mbedtls_tls_prf_types in);
const char *mbedtls_ssl_key_export_type_str(mbedtls_ssl_key_export_type in);
const char *mbedtls_ssl_sig_alg_to_str(uint16_t in);
const char *mbedtls_ssl_named_group_to_str(uint16_t in);
const char *mbedtls_ssl_get_extension_name(unsigned int extension_type);
void mbedtls_ssl_print_extensions(const mbedtls_ssl_context *ssl,
int level, const char *file, int line,
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);
#if defined(MBEDTLS_SSL_PROTO_TLS1_3) && defined(MBEDTLS_SSL_SESSION_TICKETS)
void mbedtls_ssl_print_ticket_flags(const mbedtls_ssl_context *ssl,
int level, const char *file, int line,
unsigned int flags);
#endif /* MBEDTLS_SSL_PROTO_TLS1_3 && MBEDTLS_SSL_SESSION_TICKETS */
#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)
#if defined(MBEDTLS_SSL_PROTO_TLS1_3) && defined(MBEDTLS_SSL_SESSION_TICKETS)
#define MBEDTLS_SSL_PRINT_TICKET_FLAGS(level, flags) \
mbedtls_ssl_print_ticket_flags(ssl, level, __FILE__, __LINE__, flags)
#endif
#else
#define MBEDTLS_SSL_PRINT_EXTS(level, hs_msg_type, extension_mask)
#define MBEDTLS_SSL_PRINT_EXT(level, hs_msg_type, extension_type, extra)
#if defined(MBEDTLS_SSL_PROTO_TLS1_3) && defined(MBEDTLS_SSL_SESSION_TICKETS)
#define MBEDTLS_SSL_PRINT_TICKET_FLAGS(level, flags)
#endif
#endif /* MBEDTLS_DEBUG_C */
#endif /* MBEDTLS_SSL_DEBUG_HELPERS_H */