]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Use a narrower scope for tickets_key_added_hook 14327/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 4 Jul 2024 10:09:51 +0000 (12:09 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 4 Jul 2024 10:09:51 +0000 (12:09 +0200)
pdns/tcpiohandler.cc
pdns/tcpiohandler.hh

index 897e6672c829fc0f6f367a1265831231fd96c77b..edee311ad078d5cc48408c30c614fee7b15933c1 100644 (file)
@@ -11,7 +11,7 @@ const bool TCPIOHandler::s_disableConnectForUnitTests = false;
 #include <sodium.h>
 #endif /* HAVE_LIBSODIUM */
 
-dnsdist_tickets_key_added_hook TLSCtx::s_ticketsKeyAddedHook{nullptr};
+TLSCtx::tickets_key_added_hook TLSCtx::s_ticketsKeyAddedHook{nullptr};
 
 #if defined(HAVE_DNS_OVER_TLS) || defined(HAVE_DNS_OVER_HTTPS)
 #ifdef HAVE_LIBSSL
index 59817beefe5dc540d79c7192446f7cb951600f8c..8420529811e30b22d75fdee2ec09c040f281dc5a 100644 (file)
@@ -66,8 +66,6 @@ protected:
   bool d_resumedFromInactiveTicketKey{false};
 };
 
-using dnsdist_tickets_key_added_hook = std::function<void(const std::string& key)>;
-
 class TLSCtx
 {
 public:
@@ -125,11 +123,13 @@ public:
     return false;
   }
 
-  static void setTicketsKeyAddedHook(const dnsdist_tickets_key_added_hook& hook)
+  using tickets_key_added_hook = std::function<void(const std::string& key)>;
+
+  static void setTicketsKeyAddedHook(const tickets_key_added_hook& hook)
   {
     TLSCtx::s_ticketsKeyAddedHook = hook;
   }
-  static const dnsdist_tickets_key_added_hook& getTicketsKeyAddedHook()
+  static const tickets_key_added_hook& getTicketsKeyAddedHook()
   {
     return TLSCtx::s_ticketsKeyAddedHook;
   }
@@ -143,7 +143,7 @@ protected:
   time_t d_ticketsKeyRotationDelay{0};
 
 private:
-  static dnsdist_tickets_key_added_hook s_ticketsKeyAddedHook;
+  static tickets_key_added_hook s_ticketsKeyAddedHook;
 };
 
 class TLSFrontend