diff options
author | Robby- <robbyke@gmail.com> | 2012-06-27 20:49:17 +0200 |
---|---|---|
committer | Robby- <robbyke@gmail.com> | 2012-06-27 20:49:17 +0200 |
commit | 0525ed7d57eff97b0063961d0d8e6add64f697b0 (patch) | |
tree | cae774594b9cf11884a5842092a55b4e24682543 /src/modules/extra | |
parent | 9539fa9d7bcb19100bd5b7f67d6f792e48fff909 (diff) |
m_ssl_openssl: Show the SSL cipher used after connecting.
Previously only a fingerprint was shown when one was available, else nothing was shown at all.
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 0a5a76792..6413c89f6 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -262,8 +262,10 @@ class ModuleSSLOpenSSL : public Module if (sessions[user->eh.GetFd()].sess) { if (!sessions[user->eh.GetFd()].cert->fingerprint.empty()) - user->WriteServ("NOTICE %s :*** You are connected using SSL fingerprint %s", - user->nick.c_str(), sessions[user->eh.GetFd()].cert->fingerprint.c_str()); + user->WriteServ("NOTICE %s :*** You are connected using SSL cipher \"%s\"" + " and your SSL fingerprint is %s", user->nick.c_str(), SSL_get_cipher(sessions[user->eh.GetFd()].sess), sessions[user->eh.GetFd()].cert->fingerprint.c_str()); + else + user->WriteServ("NOTICE %s :*** You are connected using SSL cipher \"%s\"", user->nick.c_str(), SSL_get_cipher(sessions[user->eh.GetFd()].sess)); } } } |