]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
doh debug: log timestamp of each OPENSSLKEYLOGFILE opening
authorPetr Špaček <petr.spacek@nic.cz>
Tue, 22 Oct 2019 11:30:47 +0000 (13:30 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Wed, 20 Nov 2019 12:17:38 +0000 (13:17 +0100)
Wireshark 3.0.5 is able to deal with # comments in middle of log file.

modules/http/debug_opensslkeylog.c

index 31fb6862205cfcf23145ba5fd4f2d46f3d440e44..4a8d13e9e3d561b58515c9307474836e96552f4a 100644 (file)
@@ -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);