]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Flush the TLS key material to the file right away 8787/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 6 Feb 2020 09:07:18 +0000 (10:07 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 6 Feb 2020 09:07:18 +0000 (10:07 +0100)
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

index 5da395c37c4064f9f0aaba8a47482ae86f22d104..6aa91bf0381769325920c0e4d90e4c453de801b0 100644 (file)
@@ -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 */