From 95749975408a985d6a6a9ff53bbf3592c90b8649 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 26 Nov 2018 14:33:44 +0000 Subject: Only check if a SSL cert is usable if we're getting the fp. --- include/modules/ssl.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/modules/ssl.h b/include/modules/ssl.h index edea45a10..69bd65009 100644 --- a/include/modules/ssl.h +++ b/include/modules/ssl.h @@ -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 ""; } -- cgit v1.2.3