From: Michał Kępień Date: Wed, 22 Dec 2021 17:17:26 +0000 (+0100) Subject: Add a logging category for TLS pre-master secrets X-Git-Tag: v9.17.22~27^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3081bda79879deeb6994ab0d7064b8dfec9a5d92;p=thirdparty%2Fbind9.git Add a logging category for TLS pre-master secrets TLS pre-master secrets will be dumped to disk using the logging framework provided by libisc. Add a new logging category for this type of debugging data in order to enable exporting it to a dedicated channel. Derive the name of the new category from the name of the relevant environment variable, SSLKEYLOGFILE. --- diff --git a/doc/arm/logging-categories.rst b/doc/arm/logging-categories.rst index d823eb2f637..781215ccd9d 100644 --- a/doc/arm/logging-categories.rst +++ b/doc/arm/logging-categories.rst @@ -97,6 +97,9 @@ ``spill`` Queries that have been terminated, either by dropping or responding with SERVFAIL, as a result of a fetchlimit quota being exceeded. +``sslkeylog`` + TLS pre-master secrets (for debugging purposes). + ``trust-anchor-telemetry`` Trust-anchor-telemetry requests received by ``named``. diff --git a/lib/isc/include/isc/log.h b/lib/isc/include/isc/log.h index d1968e0f911..f0348c7ca8b 100644 --- a/lib/isc/include/isc/log.h +++ b/lib/isc/include/isc/log.h @@ -167,8 +167,9 @@ extern isc_logmodule_t isc_modules[]; * Do not log directly to DEFAULT. Use another category. When in doubt, * use GENERAL. */ -#define ISC_LOGCATEGORY_DEFAULT (&isc_categories[0]) -#define ISC_LOGCATEGORY_GENERAL (&isc_categories[1]) +#define ISC_LOGCATEGORY_DEFAULT (&isc_categories[0]) +#define ISC_LOGCATEGORY_GENERAL (&isc_categories[1]) +#define ISC_LOGCATEGORY_SSLKEYLOG (&isc_categories[2]) /*@}*/ #define ISC_LOGMODULE_SOCKET (&isc_modules[0]) diff --git a/lib/isc/log.c b/lib/isc/log.c index 031393d4300..8e83a50aacc 100644 --- a/lib/isc/log.c +++ b/lib/isc/log.c @@ -181,6 +181,7 @@ isc_logcategory_t isc_categories[] = { { "default", 0 }, /* "default must come first. */ { "general", 0 }, + { "sslkeylog", 0 }, { NULL, 0 } }; /*!