aboutsummaryrefslogtreecommitdiffstats
path: root/modules/extra/ssl_openssl.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-10-31 18:49:58 +0000
committerGravatar Sadie Powell2025-10-31 18:49:58 +0000
commit113e95f15f86b2f800dbede419d5c4f28fd77d0a (patch)
tree450d44cc0d8c374330ca3f71ed20939c666ad23f /modules/extra/ssl_openssl.cpp
parentReduce nesting in OnCleanup hooks. (diff)
Allow getting an I/O hook from a user I/O handler.
Diffstat (limited to 'modules/extra/ssl_openssl.cpp')
-rw-r--r--modules/extra/ssl_openssl.cpp8
1 files changed, 2 insertions, 6 deletions
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<User*>(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<OpenSSLIOHook*>(sock->GetModHook(this));
+ const auto* const iohook = static_cast<OpenSSLIOHook*>(user->io->GetModHook(this));
if ((iohook) && (!iohook->IsHookReady()))
return MOD_RES_DENY;
return MOD_RES_PASSTHRU;