]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
doq: make cert and key parameters of addDOQLocal mandatory
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Fri, 29 Sep 2023 11:46:46 +0000 (13:46 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 9 Oct 2023 11:38:11 +0000 (13:38 +0200)
pdns/dnsdist-lua.cc
pdns/dnsdistdist/docs/reference/config.rst

index 22debccbaec9fc4c0d13477690c14a0d5668809f..de7284c5411fff226fa8fc3daae52c4a3010d5e1 100644 (file)
@@ -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<boost::variant<std::string, std::shared_ptr<TLSCertKeyPair>, LuaArray<std::string>, LuaArray<std::shared_ptr<TLSCertKeyPair>>>> certFiles, boost::optional<boost::variant<std::string, LuaArray<std::string>>> keyFiles, boost::optional<localbind_t> vars) {
+  luaCtx.writeFunction("addDOQLocal", [client](const std::string& addr, boost::variant<std::string, std::shared_ptr<TLSCertKeyPair>, LuaArray<std::string>, LuaArray<std::shared_ptr<TLSCertKeyPair>>> certFiles, boost::variant<std::string, LuaArray<std::string>> keyFiles, boost::optional<localbind_t> vars) {
     if (client) {
       return;
     }
@@ -2494,7 +2494,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
     setLuaSideEffect();
 
     auto frontend = std::make_shared<DOQFrontend>();
-    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);
index 2a68f20e5e12d032ed1f45dbc56c629b1fec3947..8e5d4fc599ec5f16cc4ca8bc7577411660fc341c 100644 (file)
@@ -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