diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-03-18 11:00:51 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-03-18 11:00:51 +0000 |
commit | a36020d088d020b6e5941d205e555f982134fa41 (patch) | |
tree | 814d0637e251a61e12dff674c0cf35e7cf566fff | |
parent | 1f610e7c1fece538fc6757b076ac1a0b889a3fce (diff) |
Fix for bug #791, if an error is set treat this as 'could not get certificate'
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11233 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/extra/m_sslinfo.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/modules/extra/m_sslinfo.cpp b/src/modules/extra/m_sslinfo.cpp index 8252cf1c5..fb1a00666 100644 --- a/src/modules/extra/m_sslinfo.cpp +++ b/src/modules/extra/m_sslinfo.cpp @@ -39,11 +39,14 @@ class CommandSSLInfo : public Command { if (cert->GetError().length()) { - user->WriteServ("NOTICE %s :*** Error: %s", user->nick.c_str(), cert->GetError().c_str()); + user->WriteServ("NOTICE %s :*** No SSL certificate information for this user (%s).", user->nick.c_str(), cert->GetError().c_str()); + } + else + { + user->WriteServ("NOTICE %s :*** Distinguised Name: %s", user->nick.c_str(), cert->GetDN().c_str()); + user->WriteServ("NOTICE %s :*** Issuer: %s", user->nick.c_str(), cert->GetIssuer().c_str()); + user->WriteServ("NOTICE %s :*** Key Fingerprint: %s", user->nick.c_str(), cert->GetFingerprint().c_str()); } - user->WriteServ("NOTICE %s :*** Distinguised Name: %s", user->nick.c_str(), cert->GetDN().c_str()); - user->WriteServ("NOTICE %s :*** Issuer: %s", user->nick.c_str(), cert->GetIssuer().c_str()); - user->WriteServ("NOTICE %s :*** Key Fingerprint: %s", user->nick.c_str(), cert->GetFingerprint().c_str()); return CMD_LOCALONLY; } else |