From: Remi Gacogne Date: Thu, 6 Feb 2020 09:07:18 +0000 (+0100) Subject: dnsdist: Flush the TLS key material to the file right away X-Git-Tag: auth-4.3.0-beta2~37^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F8787%2Fhead;p=thirdparty%2Fpdns.git 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. --- 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 */