From: Charles-Henri Bruyand Date: Fri, 29 Sep 2023 11:46:46 +0000 (+0200) Subject: doq: make cert and key parameters of addDOQLocal mandatory X-Git-Tag: rec-5.0.0-alpha2~6^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=59b2d7ab6bd9d5700a482880677be0f6c20b87df;p=thirdparty%2Fpdns.git doq: make cert and key parameters of addDOQLocal mandatory --- diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index 22debccbae..de7284c541 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -2483,7 +2483,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck) #endif /* HAVE_DNS_OVER_HTTPS */ }); - luaCtx.writeFunction("addDOQLocal", [client](const std::string& addr, boost::optional, LuaArray, LuaArray>>> certFiles, boost::optional>> keyFiles, boost::optional vars) { + luaCtx.writeFunction("addDOQLocal", [client](const std::string& addr, boost::variant, LuaArray, LuaArray>> certFiles, boost::variant> keyFiles, boost::optional vars) { if (client) { return; } @@ -2494,7 +2494,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck) setLuaSideEffect(); auto frontend = std::make_shared(); - if (!loadTLSCertificateAndKeys("addDOQLocal", frontend->d_tlsConfig.d_certKeyPairs, *certFiles, *keyFiles)) { + if (!loadTLSCertificateAndKeys("addDOQLocal", frontend->d_tlsConfig.d_certKeyPairs, certFiles, keyFiles)) { return; } frontend->d_local = ComboAddress(addr, 853); diff --git a/pdns/dnsdistdist/docs/reference/config.rst b/pdns/dnsdistdist/docs/reference/config.rst index 2a68f20e5e..8e5d4fc599 100644 --- a/pdns/dnsdistdist/docs/reference/config.rst +++ b/pdns/dnsdistdist/docs/reference/config.rst @@ -171,7 +171,7 @@ Listen Sockets * ``readAhead``: bool - When the TLS provider is set to OpenSSL, whether we tell the library to read as many input bytes as possible, which leads to better performance by reducing the number of syscalls. Default is true. * ``proxyProtocolOutsideTLS``: bool - When the use of incoming proxy protocol is enabled, whether the payload is prepended after the start of the TLS session (so inside, meaning it is protected by the TLS layer providing encryption and authentication) or not (outside, meaning it is in clear-text). Default is false which means inside. Note that most third-party software like HAproxy expect the proxy protocol payload to be outside, in clear-text. -.. function:: addDOQLocal(address, [certFile(s) [, keyFile(s) [, urls [, options]]]]) +.. function:: addDOQLocal(address, certFile(s), keyFile(s) [, options]) .. versionadded:: 1.9.0