summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp5
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp6
2 files changed, 9 insertions, 2 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 50a751412..4ba95f4a1 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -525,7 +525,10 @@ class ModuleSSLGnuTLS : public Module
// This will do for setting the ssl flag...it could be done earlier if it's needed. But this seems neater.
userrec* extendme = Srv->FindDescriptor(session->fd);
- extendme->Extend("ssl", "ON");
+ if (extendme)
+ {
+ extendme->Extend("ssl", "ON");
+ }
// Change the seesion state
session->status = ISSL_HANDSHAKEN;
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 134efbe0c..3a0a01409 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -599,7 +599,11 @@ class ModuleSSLOpenSSL : public Module
log(DEBUG, "m_ssl_openssl.so: Handshake completed");
// This will do for setting the ssl flag...it could be done earlier if it's needed. But this seems neater.
- Srv->FindDescriptor(session->fd)->Extend("ssl", "ON");
+ userrec* u = Srv->FindDescriptor(session->fd);
+ if (u)
+ {
+ u->Extend("ssl", "ON");
+ }
session->status = ISSL_OPEN;