keylog: disable if unused

Fully disable keylog code if there is no TLS or QUIC subsystem using it.

Closes #12350
This commit is contained in:
Viktor Szakats 2023-11-17 16:45:40 +00:00
parent 20bb363f25
commit 7f33848c98
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -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 <curl/curl.h>
@ -157,3 +162,5 @@ Curl_tls_keylog_write(const char *label,
fputs(line, keylog_file_fp);
return true;
}
#endif /* TLS or QUIC backend */