From: Petr Špaček Date: Tue, 22 Oct 2019 11:30:47 +0000 (+0200) Subject: doh debug: log timestamp of each OPENSSLKEYLOGFILE opening X-Git-Tag: v4.3.0~8^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b49ee7b0065519aa9904dfb5fe552ffaa32a3b18;p=thirdparty%2Fknot-resolver.git doh debug: log timestamp of each OPENSSLKEYLOGFILE opening Wireshark 3.0.5 is able to deal with # comments in middle of log file. --- diff --git a/modules/http/debug_opensslkeylog.c b/modules/http/debug_opensslkeylog.c index 31fb68622..4a8d13e9e 100644 --- a/modules/http/debug_opensslkeylog.c +++ b/modules/http/debug_opensslkeylog.c @@ -111,7 +111,7 @@ static void init_keylog_file(void) if (filename) { /* ctime output is max 26 bytes, POSIX 1003.1-2017 */ keylog_file_fd = open(filename, O_WRONLY | O_APPEND | O_CREAT, 0600); - if (keylog_file_fd >= 0 && lseek(keylog_file_fd, 0, SEEK_END) == 0) { + if (keylog_file_fd >= 0) { time_t timenow = time(NULL); char txtnow[30] = { '#', ' ', 0 }; ctime_r(&timenow, txtnow + 2);