From 7f33848c98665107aff5fb9ec83114d8c049ef0a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 17 Nov 2023 16:45:40 +0000 Subject: [PATCH] keylog: disable if unused Fully disable keylog code if there is no TLS or QUIC subsystem using it. Closes #12350 --- lib/vtls/keylog.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/vtls/keylog.c b/lib/vtls/keylog.c index d37bb183e7..baea548a3e 100644 --- a/lib/vtls/keylog.c +++ b/lib/vtls/keylog.c @@ -23,6 +23,11 @@ ***************************************************************************/ #include "curl_setup.h" +#if defined(USE_OPENSSL) || \ + defined(USE_WOLFSSL) || \ + (defined(USE_NGTCP2) && defined(USE_NGHTTP3)) || \ + defined(USE_QUICHE) + #include "keylog.h" #include @@ -157,3 +162,5 @@ Curl_tls_keylog_write(const char *label, fputs(line, keylog_file_fp); return true; } + +#endif /* TLS or QUIC backend */