26#ifndef ROUTER_SRC_OPENSSL_INCLUDE_TLS_TLS_MESSAGE_DUMPER_H_
27#define ROUTER_SRC_OPENSSL_INCLUDE_TLS_TLS_MESSAGE_DUMPER_H_
29#include <openssl/ssl.h>
54 SSL_CTX_set_msg_callback(
ctx_,
nullptr);
56 if (!
name_.empty()) SSL_CTX_set_msg_callback_arg(
ctx_,
nullptr);
60 SSL_set_msg_callback(
ssl_,
nullptr);
62 if (!
name_.empty()) SSL_set_msg_callback_arg(
ssl_,
nullptr);
68 if (0 == write_p)
return "RECV";
97 case SSL3_RT_HANDSHAKE:
98 return "SSL3_RT_HANDSHAKE";
99 case SSL3_RT_CHANGE_CIPHER_SPEC:
100 return "SSL3_RT_CHANGE_CIPHER_SPEC";
102 return "SSL3_RT_HEADER";
103 case SSL3_RT_INNER_CONTENT_TYPE:
104 return "SSL3_RT_INNER_CONTENT_TYPE";
106 return "SSL3_RT_ALERT";
114 if (
nullptr == arg)
return "";
116 std::string
result{
reinterpret_cast<char *
>(arg)};
122 const void *
buf,
size_t len, SSL *,
void *arg) {
126 <<
", buffer: " <<
buf <<
", len:" << len << std::endl;
Definition: tls_message_dumper.h:36
static std::string to_string_name(void *arg)
Definition: tls_message_dumper.h:113
TlsMessageDumper(SSL *ssl, std::string &&name)
Definition: tls_message_dumper.h:45
static std::string to_string_content(int content)
Definition: tls_message_dumper.h:93
~TlsMessageDumper()
Definition: tls_message_dumper.h:52
static std::string to_string_version(int version)
Definition: tls_message_dumper.h:72
static std::string to_string_write_p(int write_p)
Definition: tls_message_dumper.h:67
SSL_CTX * ctx_
Definition: tls_message_dumper.h:130
std::string name_
Definition: tls_message_dumper.h:131
TlsMessageDumper(SSL_CTX *ctx, std::string &&name)
Definition: tls_message_dumper.h:38
SSL * ssl_
Definition: tls_message_dumper.h:129
static void message_callback(int write_p, int version, int content_type, const void *buf, size_t len, SSL *, void *arg)
Definition: tls_message_dumper.h:121
static std::string to_string(const LEX_STRING &str)
Definition: lex_string.h:50
Definition: buf0block_hint.cc:30
constexpr value_type ssl
Definition: classic_protocol_constants.h:49
Definition: gcs_xcom_synode.h:64
Definition: tls_keylog_dumper.h:32
struct result result
Definition: result.h:34
required uint64 version
Definition: replication_group_member_actions.proto:41
case opt name
Definition: sslopt-case.h:29