From af0bd57ff5b55e8e4602b4a52268bfbfc9c5c442 Mon Sep 17 00:00:00 2001 From: danieldg Date: Fri, 3 Jul 2009 12:49:01 +0000 Subject: 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 --- src/modules/extra/m_ssl_gnutls.cpp | 3 ++- src/modules/extra/m_ssl_openssl.cpp | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/modules/extra') 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)); -- cgit v1.2.3