bind9/bin/named
Michał Kępień 9e81903171 Set up default logging for SSLKEYLOGFILE
A customary method of exporting TLS pre-master secrets used by a piece
of software (for debugging purposes, e.g. to examine decrypted traffic
in a packet sniffer) is to set the SSLKEYLOGFILE environment variable to
the path to the file in which this data should be logged.

In order to enable writing any data to a file using the logging
framework provided by libisc, a logging channel needs to be defined and
the relevant logging category needs to be associated with it.  Since the
SSLKEYLOGFILE variable is only expected to contain a path, some defaults
for the logging channel need to be assumed.  Add a new function,
named_log_setdefaultsslkeylogfile(), for setting up those implicit
defaults, which are equivalent to the following logging configuration:

    channel default_sslkeylogfile {
        file "${SSLKEYLOGFILE}" versions 10 size 100m suffix timestamp;
    };

    category sslkeylog {
    	default_sslkeylogfile;
    };

This ensures TLS pre-master secrets do not use up more than about 1 GB
of disk space, which should be enough to hold debugging data for the
most recent 1 million TLS connections.

As these values are arguably not universally appropriate for all
deployment environments, a way for overriding them needs to exist.
Suppress creation of the default logging channel for TLS pre-master
secrets when the SSLKEYLOGFILE variable is set to the string "config".
This enables providing custom logging configuration for the relevant
category via the "logging" stanza.  (Note that it would have been
simpler to only skip setting up the default logging channel for TLS
pre-master secrets if the SSLKEYLOGFILE environment variable is not set
at all.  However, libisc only logs pre-master secrets if that variable
is set.  Detecting a "magic" string enables the SSLKEYLOGFILE
environment variable to serve as a single control for both enabling TLS
pre-master secret collection and potentially also indicating where and
how they should be exported.)
2021-12-22 18:17:26 +01:00
..
include Set up default logging for SSLKEYLOGFILE 2021-12-22 18:17:26 +01:00
.gitignore Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
bind9.xsl Fix incorrect version bump in statistics channels 2021-11-04 18:45:36 -07:00
builtin.c Make isc_result a static enum 2021-10-06 11:22:20 +02:00
config.c Reject NSEC records with next field with \000 label 2021-12-02 14:27:18 +01:00
control.c Make isc_result a static enum 2021-10-06 11:22:20 +02:00
controlconf.c Make isc_result a static enum 2021-10-06 11:22:20 +02:00
dlz_dlopen_driver.c Make isc_result a static enum 2021-10-06 11:22:20 +02:00
fuzz.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
geoip.c Move NAME_MAX and PATH_MAX from isc/platform.h to isc/dir.h 2021-07-06 05:33:48 +00:00
log.c Set up default logging for SSLKEYLOGFILE 2021-12-22 18:17:26 +01:00
logconf.c Set up default logging for SSLKEYLOGFILE 2021-12-22 18:17:26 +01:00
main.c Remove mutex profiling code 2021-12-09 12:25:21 +01:00
Makefile.am Add '\n' to the end of each line when generating xsl.c 2021-11-02 11:18:45 +00:00
named.conf.rst Mark broken-nsec option as deprecated 2021-12-06 16:55:55 +01:00
named.rst remove all references to isc_socket and related types 2021-10-15 01:01:25 -07:00
os.c Completely remove BIND 9 Windows support 2021-06-09 14:35:14 +02:00
server.c Set up default logging for SSLKEYLOGFILE 2021-12-22 18:17:26 +01:00
statschannel.c Correct spelling of synthesized 2021-12-02 14:18:41 +01:00
tkeyconf.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
transportconf.c XoT: add support for client-side TLS parameters 2021-12-01 12:00:28 +02:00
tsigconf.c Make isc_result a static enum 2021-10-06 11:22:20 +02:00
xsl_p.h Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
zoneconf.c dns/resolver.c: Return void when ISC_R_SUCCESS is only returned value 2021-10-13 05:48:51 +02:00