summaryrefslogtreecommitdiff
path: root/include/modules/ssl.h
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-11-26 14:33:44 +0000
committerPeter Powell <petpow@saberuk.com>2018-11-26 14:33:44 +0000
commit95749975408a985d6a6a9ff53bbf3592c90b8649 (patch)
tree0b27e450f11e29054e962ea2db773f3d743a9d24 /include/modules/ssl.h
parent0d4138631c4f259394e175c9a68257bb16ca4502 (diff)
Only check if a SSL cert is usable if we're getting the fp.
Diffstat (limited to 'include/modules/ssl.h')
-rw-r--r--include/modules/ssl.h6
1 files 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 "";
}