Report when loading of dhparam-file fails

prior to this loading of the configuration could fail without
an informative error message being logged.
This commit is contained in:
Mark Andrews
2022-01-04 12:28:08 +11:00
parent 1246fd3b5f
commit 2baa58c59f

View File

@@ -22,6 +22,7 @@
#include <dns/acl.h>
#include <ns/listenlist.h>
#include <ns/log.h>
static void
destroy(ns_listenlist_t *list);
@@ -116,6 +117,13 @@ listenelt_create(isc_mem_t *mctx, in_port_t port, dns_acl_t *acl,
if (!isc_tlsctx_load_dhparams(
sslctx, tls_params->dhparam_file))
{
isc_log_write(ns_lctx,
NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_INTERFACEMGR,
ISC_LOG_ERROR,
"loading of dhparam-file "
"'%s' failed",
tls_params->dhparam_file);
result = ISC_R_FAILURE;
goto tls_error;
}