From a36020d088d020b6e5941d205e555f982134fa41 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 18 Mar 2009 11:00:51 +0000 Subject: 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 --- src/modules/extra/m_sslinfo.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/modules') 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 -- cgit v1.2.3