26#ifndef ROUTER_SRC_OPENSSL_INCLUDE_TLS_TLS_KEYLOG_DUMPER_H_
27#define ROUTER_SRC_OPENSSL_INCLUDE_TLS_TLS_KEYLOG_DUMPER_H_
29#include <openssl/ssl.h>
37 auto env_logfile = getenv(
"SSLKEYLOGFILE");
40 if (!stream.is_open() && env_logfile) {
41 stream.open(env_logfile, std::ios::app);
43 if (stream.is_open()) {
60 if (!s.is_open())
return;
63 s << line << std::endl;
68 static std::ofstream
file;
Definition: tls_keylog_dumper.h:34
~TlsKeylogDumper()
Definition: tls_keylog_dumper.h:50
static void keylog_callback(const SSL *, const char *line)
Definition: tls_keylog_dumper.h:57
static std::ofstream & get_stream()
Definition: tls_keylog_dumper.h:67
TlsKeylogDumper(SSL_CTX *ctx)
Definition: tls_keylog_dumper.h:36
bool release_
Definition: tls_keylog_dumper.h:73
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
Definition: tls_keylog_dumper.h:32