diff options
author | Peter Powell <petpow@saberuk.com> | 2018-11-26 14:33:44 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-11-26 14:33:44 +0000 |
commit | 95749975408a985d6a6a9ff53bbf3592c90b8649 (patch) | |
tree | 0b27e450f11e29054e962ea2db773f3d743a9d24 | |
parent | 0d4138631c4f259394e175c9a68257bb16ca4502 (diff) |
Only check if a SSL cert is usable if we're getting the fp.
-rw-r--r-- | include/modules/ssl.h | 6 |
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 ""; } |