From 113e95f15f86b2f800dbede419d5c4f28fd77d0a Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 31 Oct 2025 18:49:58 +0000 Subject: Allow getting an I/O hook from a user I/O handler. --- modules/extra/ssl_openssl.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'modules/extra/ssl_openssl.cpp') diff --git a/modules/extra/ssl_openssl.cpp b/modules/extra/ssl_openssl.cpp index 3398e78f4..86d046cb2 100644 --- a/modules/extra/ssl_openssl.cpp +++ b/modules/extra/ssl_openssl.cpp @@ -1060,7 +1060,7 @@ public: return; auto* user = IS_LOCAL(static_cast(item)); - if (!user || !user->io->GetSocket() || !user->io->GetSocket()->GetModHook(this)) + if (!user || !user->io->GetModHook(this)) return; // User is using TLS, they're a local user, and they're using one of *our* TLS ports. @@ -1070,11 +1070,7 @@ public: ModResult OnCheckReady(LocalUser* user) override { - auto* sock = user->io->GetSocket(); - if (!sock) - return MOD_RES_PASSTHRU; // No socket. - - const OpenSSLIOHook* const iohook = static_cast(sock->GetModHook(this)); + const auto* const iohook = static_cast(user->io->GetModHook(this)); if ((iohook) && (!iohook->IsHookReady())) return MOD_RES_DENY; return MOD_RES_PASSTHRU; -- cgit v1.3.1-10-gc9f91