summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index cb88fdf70..b88cf0c03 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -303,11 +303,17 @@ class ModuleSSLGnuTLS : public Module
}
else if (strcmp("IS_ATTACH", request->GetId()) == 0)
{
- issl_session* session = &sessions[ISR->Sock->GetFd()];
- if (session)
+ if (ISR->Sock->GetFd() > -1)
{
- VerifyCertificate(session, (InspSocket*)ISR->Sock);
- return "OK";
+ issl_session* session = &sessions[ISR->Sock->GetFd()];
+ if (session)
+ {
+ if ((Extensible*)ServerInstance->FindDescriptor(ISR->Sock->GetFd()) == (Extensible*)(ISR->Sock))
+ {
+ VerifyCertificate(session, (InspSocket*)ISR->Sock);
+ return "OK";
+ }
+ }
}
}
return NULL;