From: Remi Gacogne Date: Thu, 4 Jul 2024 10:09:51 +0000 (+0200) Subject: dnsdist: Use a narrower scope for tickets_key_added_hook X-Git-Tag: rec-5.2.0-alpha1~198^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2eca15eae83a1ef6b5d260a8b183a40f95d94a4f;p=thirdparty%2Fpdns.git dnsdist: Use a narrower scope for tickets_key_added_hook --- diff --git a/pdns/tcpiohandler.cc b/pdns/tcpiohandler.cc index 897e6672c8..edee311ad0 100644 --- a/pdns/tcpiohandler.cc +++ b/pdns/tcpiohandler.cc @@ -11,7 +11,7 @@ const bool TCPIOHandler::s_disableConnectForUnitTests = false; #include #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 diff --git a/pdns/tcpiohandler.hh b/pdns/tcpiohandler.hh index 59817beefe..8420529811 100644 --- a/pdns/tcpiohandler.hh +++ b/pdns/tcpiohandler.hh @@ -66,8 +66,6 @@ protected: bool d_resumedFromInactiveTicketKey{false}; }; -using dnsdist_tickets_key_added_hook = std::function; - 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; + + 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