diff options
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 3 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 964e488d1..c9a421e39 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -309,6 +309,9 @@ class ModuleSSLGnuTLS : public Module } else if (strcmp("IS_HSDONE", request->GetId()) == 0) { + if (ISR->Sock->GetFd() < 0) + return (char*)"OK"; + issl_session* session = &sessions[ISR->Sock->GetFd()]; return (session->status == ISSL_HANDSHAKING_READ || session->status == ISSL_HANDSHAKING_WRITE) ? NULL : (char*)"OK"; } diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 7ed29ec37..6e2b713f9 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -359,6 +359,9 @@ class ModuleSSLOpenSSL : public Module } else if (strcmp("IS_HSDONE", request->GetId()) == 0) { + if (ISR->Sock->GetFd() < 0) + return (char*)"OK"; + issl_session* session = &sessions[ISR->Sock->GetFd()]; return (session->status == ISSL_HANDSHAKING) ? NULL : (char*)"OK"; } |