summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-07-03 12:49:01 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-07-03 12:49:01 +0000
commitaf0bd57ff5b55e8e4602b4a52268bfbfc9c5c442 (patch)
tree73d47122889ff9a8471cd8d4c8a35d357283db66 /src/modules/extra
parent5025e36bead1412946ff0a3f40699ceac7506a4b (diff)
Fix double-send of SSL metadata in openssl, possible segfault in gnutls
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11433 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp3
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index f76148843..c9dd6d37e 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -689,7 +689,8 @@ class ModuleSSLGnuTLS : public Module
}
ServerInstance->PI->SendMetaData(user, TYPE_USER, "ssl", "ON");
- ServerInstance->PI->SendMetaData(user, TYPE_USER, "ssl_cert", certdata->GetMetaLine().c_str());
+ if (certdata)
+ ServerInstance->PI->SendMetaData(user, TYPE_USER, "ssl_cert", certdata->GetMetaLine().c_str());
}
}
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 8c35d5d0f..b38b5c96f 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -773,9 +773,6 @@ class ModuleSSLOpenSSL : public Module
// protocol module has propagated the NICK message.
if ((user->GetIOHook() == this) && (IS_LOCAL(user)))
{
- // Tell whatever protocol module we're using that we need to inform other servers of this metadata NOW.
- ServerInstance->PI->SendMetaData(user, TYPE_USER, "ssl", "on");
-
ssl_cert* certdata = VerifyCertificate(&sessions[user->GetFd()], user);
if (sessions[user->GetFd()].sess)
user->WriteServ("NOTICE %s :*** You are connected using SSL cipher \"%s\"", user->nick.c_str(), SSL_get_cipher(sessions[user->GetFd()].sess));