summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorPetr Špaček <petr.spacek@nic.cz>2019-10-22 13:30:47 +0200
committerTomas Krizek <tomas.krizek@nic.cz>2019-11-20 13:17:38 +0100
commitb49ee7b0065519aa9904dfb5fe552ffaa32a3b18 (patch)
tree072093cc126e8c190fdfe744d32ed5bc54bd0631 /modules
parentdoh debug: create OPENSSLKEYLOGFILE accessible only by process owner (diff)
downloadknot-resolver-b49ee7b0065519aa9904dfb5fe552ffaa32a3b18.tar.xz
knot-resolver-b49ee7b0065519aa9904dfb5fe552ffaa32a3b18.zip
doh debug: log timestamp of each OPENSSLKEYLOGFILE opening
Wireshark 3.0.5 is able to deal with # comments in middle of log file.
Diffstat (limited to 'modules')
-rw-r--r--modules/http/debug_opensslkeylog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/http/debug_opensslkeylog.c b/modules/http/debug_opensslkeylog.c
index 31fb6862..4a8d13e9 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);