diff options
| author | 2025-10-26 16:46:19 +0000 | |
|---|---|---|
| committer | 2025-10-26 16:46:19 +0000 | |
| commit | 9beffb09a77202cc344f7037097b3ce7b8fadb62 (patch) | |
| tree | c77bd1a4141a52066c3f0f964ed470621041bd64 /modules/extra/ssl_openssl.cpp | |
| parent | Merge branch 'insp4' into master. (diff) | |
Start splitting the user I/O interface from the network socket.
Diffstat (limited to 'modules/extra/ssl_openssl.cpp')
| -rw-r--r-- | modules/extra/ssl_openssl.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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<OpenSSLIOHook*>(user->eh.GetModHook(this)); + auto* sock = user->io->GetSocket(); + if (!sock) + return MOD_RES_PASSTHRU; // No socket. + + const OpenSSLIOHook* const iohook = static_cast<OpenSSLIOHook*>(sock->GetModHook(this)); if ((iohook) && (!iohook->IsHookReady())) return MOD_RES_DENY; return MOD_RES_PASSTHRU; |
