diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-09 22:06:15 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-09 22:06:15 +0000 |
commit | 3af9d9b0605a503ed16a8b8314587451979103d7 (patch) | |
tree | 5c2ea0f4733404b36899dfcc0954d57929938a35 /src/modules/extra/m_ssl_openssl.cpp | |
parent | 6d2bf07374515c88734a19ffaac179b7357059ea (diff) |
Make it all work properly. Have it wait for handshake to complete before sending anything down the line
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5898 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra/m_ssl_openssl.cpp')
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 06708ff54..2f393f718 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -311,6 +311,20 @@ class ModuleSSLOpenSSL : public Module ServerInstance->Log(DEBUG, "Unhooking socket %08x", ISR->Sock); return ServerInstance->Config->DelIOHook((InspSocket*)ISR->Sock) ? (char*)"OK" : NULL; } + else if (strcmp("IS_HSDONE", request->GetId()) == 0) + { + issl_session* session = &sessions[ISR->Sock->GetFd()]; + return (session->status == ISSL_HANDSHAKING) ? NULL : (char*)"OK"; + } + else if (strcmp("IS_ATTACH", request->GetId()) == 0) + { + issl_session* session = &sessions[ISR->Sock->GetFd()]; + if (session) + { + VerifyCertificate(session, (InspSocket*)ISR->Sock); + return "OK"; + } + } return NULL; } |