From 9beffb09a77202cc344f7037097b3ce7b8fadb62 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 26 Oct 2025 16:46:19 +0000 Subject: Start splitting the user I/O interface from the network socket. --- modules/extra/ssl_openssl.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules/extra/ssl_openssl.cpp') diff --git a/modules/extra/ssl_openssl.cpp b/modules/extra/ssl_openssl.cpp index 3593e8a8c..1f63c24e3 100644 --- a/modules/extra/ssl_openssl.cpp +++ b/modules/extra/ssl_openssl.cpp @@ -1060,7 +1060,7 @@ public: { LocalUser* user = IS_LOCAL((User*)item); - if ((user) && (user->eh.GetModHook(this))) + if (user && user->io->GetSocket() && user->io->GetSocket()->GetModHook(this)) { // User is using TLS, they're a local user, and they're using one of *our* TLS ports. // Potentially there could be multiple TLS modules loaded at once on different ports. @@ -1071,7 +1071,11 @@ public: ModResult OnCheckReady(LocalUser* user) override { - const OpenSSLIOHook* const iohook = static_cast(user->eh.GetModHook(this)); + auto* sock = user->io->GetSocket(); + if (!sock) + return MOD_RES_PASSTHRU; // No socket. + + const OpenSSLIOHook* const iohook = static_cast(sock->GetModHook(this)); if ((iohook) && (!iohook->IsHookReady())) return MOD_RES_DENY; return MOD_RES_PASSTHRU; -- cgit v1.3.1-10-gc9f91