summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-04-28 17:10:10 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-04-28 17:10:10 +0200
commite7e9f350ac3bda43ba297160a09f8d04a06cfc6f (patch)
tree9589e4c1b22c25221c2b8ba6638152d2df286cc4 /src/modules/extra
parentf91da925b585414ab8e768aa331f37ca2d348e2e (diff)
Deduplicate code for on connect SSL ciphersuite NOTICE by moving it into m_sslinfo
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp21
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp22
2 files changed, 0 insertions, 43 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 69aedf03d..a1c989163 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -1150,20 +1150,6 @@ info_done_dealloc:
return 1;
}
- void TellCiphersAndFingerprint(LocalUser* user)
- {
- if (sess)
- {
- std::string text = "*** You are connected using SSL cipher '";
- GetCiphersuite(text);
- text += '\'';
- if (!certificate->fingerprint.empty())
- text += " and your SSL certificate fingerprint is " + certificate->fingerprint;
-
- user->WriteNotice(text);
- }
- }
-
void GetCiphersuite(std::string& out) const CXX11_OVERRIDE
{
if (!IsHandshakeDone())
@@ -1346,13 +1332,6 @@ class ModuleSSLGnuTLS : public Module
return Version("Provides SSL support for clients", VF_VENDOR);
}
- void OnUserConnect(LocalUser* user) CXX11_OVERRIDE
- {
- IOHook* hook = user->eh.GetIOHook();
- if (hook && hook->prov->creator == this)
- static_cast<GnuTLSIOHook*>(hook)->TellCiphersAndFingerprint(user);
- }
-
ModResult OnCheckReady(LocalUser* user) CXX11_OVERRIDE
{
if ((user->eh.GetIOHook()) && (user->eh.GetIOHook()->prov->creator == this))
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index ed66291f4..80c9d9395 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -720,21 +720,6 @@ class OpenSSLIOHook : public SSLIOHook
return 1;
}
- void TellCiphersAndFingerprint(LocalUser* user)
- {
- if (sess)
- {
- std::string text = "*** You are connected using SSL cipher '";
- GetCiphersuite(text);
- text += '\'';
- const std::string& fingerprint = certificate->fingerprint;
- if (!fingerprint.empty())
- text += " and your SSL certificate fingerprint is " + fingerprint;
-
- user->WriteNotice(text);
- }
- }
-
void GetCiphersuite(std::string& out) const CXX11_OVERRIDE
{
if (!IsHandshakeDone())
@@ -919,13 +904,6 @@ class ModuleSSLOpenSSL : public Module
}
}
- void OnUserConnect(LocalUser* user) CXX11_OVERRIDE
- {
- IOHook* hook = user->eh.GetIOHook();
- if (hook && hook->prov->creator == this)
- static_cast<OpenSSLIOHook*>(hook)->TellCiphersAndFingerprint(user);
- }
-
void OnCleanup(int target_type, void* item) CXX11_OVERRIDE
{
if (target_type == TYPE_USER)