]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
fix Remi's comments and some formatting
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Thu, 10 Oct 2024 10:43:15 +0000 (12:43 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 25 Nov 2024 16:03:27 +0000 (17:03 +0100)
(cherry picked from commit c9177f2274ce98a4130d22e2dc47b6326d206086)

pdns/dnsdist-lua.cc
pdns/dnsdistdist/docs/reference/config.rst
pdns/tcpiohandler.cc
regression-tests.dnsdist/test_TLS.py

index 49c353c9477fbdfb105aff8d3858d3781c2e86dc..8f5b3bb826e935fc5d524e614ce9bf2413c514d1 100644 (file)
@@ -3071,14 +3071,14 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
       }
       try {
 #ifdef HAVE_DNS_OVER_TLS
-       if (frontend->tlsFrontend) {
-         frontend->tlsFrontend->loadTicketsKey(key);
-       }
+        if (frontend->tlsFrontend) {
+          frontend->tlsFrontend->loadTicketsKey(key);
+        }
 #endif /* HAVE_DNS_OVER_TLS */
 #ifdef HAVE_DNS_OVER_HTTPS
-       if (frontend->dohFrontend) {
-         frontend->dohFrontend->loadTicketsKey(key);
-       }
+        if (frontend->dohFrontend) {
+          frontend->dohFrontend->loadTicketsKey(key);
+        }
 #endif /* HAVE_DNS_OVER_HTTPS */
       }
       catch (const std::exception& e) {
index 5f283e03487fd1da298d9783e7974c478e6d6fb3..c5fe0673bf4413dd16632c2c97b4eb189d920863 100644 (file)
@@ -2259,7 +2259,7 @@ DOHFrontend
 
   .. method:: DOHFrontend:loadTicketsKey(key)
 
-     Replace the current TLS tickets key with a given one.
+     Load a new TLS tickets key.
 
      :param str key: the new raw TLS tickets key to load.
 
@@ -2444,7 +2444,7 @@ TLSFrontend
 
   .. method:: TLSFrontend:loadTicketsKey(key)
 
-     Replace the current TLS tickets key with a given one.
+     Load a new TLS tickets key.
 
     :param str key: the new raw TLS tickets key to load.
 
index 547aaa40b9e6086470b108154d30e2db525e2409..a437e45cc2a70fc03405fcf94af5ae256d23b7c5 100644 (file)
@@ -1047,9 +1047,6 @@ public:
 
     }
     catch (const std::exception& e) {
-      safe_memory_release(d_key.data, d_key.size);
-      gnutls_free(d_key.data);
-      d_key.data = nullptr;
       safe_memory_release(d_key.data, d_key.size);
       gnutls_free(d_key.data);
       d_key.data = nullptr;
index f40c18cfe450138072bce8454edd07b2379c7ff2..c54f3dee410ec6260965a315ee11d58d02b78b69 100644 (file)
@@ -555,7 +555,6 @@ class TestOpenSSLTLSTicketsKeyCallback(DNSDistTest):
         """
 
         newKey = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(80))
-        print("about to send command: `{}`".format("getTLSFrontend(0):setTicketsKey(\"{}\")".format(newKey)))
         self.sendConsoleCommand("getTLSFrontend(0):loadTicketsKey(\"{}\")".format(newKey))
         keyLen = self.sendConsoleCommand('lastKeyLen')
         self.assertEqual(int(keyLen), 80)
@@ -597,7 +596,6 @@ class TestGnuTLSTLSTicketsKeyCallback(DNSDistTest):
         """
 
         newKey = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(64))
-        print("about to send command: `{}`".format("getTLSFrontend(0):setTicketsKey(\"{}\")".format(newKey)))
         self.sendConsoleCommand("getTLSFrontend(0):loadTicketsKey(\"{}\")".format(newKey))
         keyLen = self.sendConsoleCommand('lastKeyLen')
         self.assertEqual(int(keyLen), 64)