]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Only check if a SSL cert is usable if we're getting the fp.
authorPeter Powell <petpow@saberuk.com>
Mon, 26 Nov 2018 14:33:44 +0000 (14:33 +0000)
committerPeter Powell <petpow@saberuk.com>
Mon, 26 Nov 2018 14:33:44 +0000 (14:33 +0000)
include/modules/ssl.h

index edea45a1092e73e787d7b9bcc376de023a26f3c9..69bd65009eb52783248d4fbf81b230fd04401903 100644 (file)
@@ -195,9 +195,7 @@ class SSLIOHook : public IOHook
         */
        ssl_cert* GetCertificate() const
        {
-               if (certificate && certificate->IsUsable())
-                       return certificate;
-               return NULL;
+               return certificate;
        }
 
        /**
@@ -208,7 +206,7 @@ class SSLIOHook : public IOHook
        std::string GetFingerprint() const
        {
                ssl_cert* cert = GetCertificate();
-               if (cert)
+               if (cert && certificate->IsUsable())
                        return cert->GetFingerprint();
                return "";
        }