From 9b56c83d6fddda67836f02762303e86565708394 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 6 Feb 2020 10:07:18 +0100 Subject: [PATCH] dnsdist: Flush the TLS key material to the file right away This feature is used to debug TLS flows, we don't really care about the performance in that case and we want to have access to the keys as soon as possible, without waiting for a buffer to be flushed. --- pdns/dnsdistdist/libssl.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/pdns/dnsdistdist/libssl.cc b/pdns/dnsdistdist/libssl.cc index 5da395c37c..6aa91bf038 100644 --- a/pdns/dnsdistdist/libssl.cc +++ b/pdns/dnsdistdist/libssl.cc @@ -744,6 +744,7 @@ static void libssl_key_log_file_callback(const SSL* ssl, const char* line) } fprintf(fp, "%s\n", line); + fflush(fp); } #endif /* HAVE_SSL_CTX_SET_KEYLOG_CALLBACK */ -- 2.47.2