summaryrefslogtreecommitdiff
path: root/include/ssl_key_handler.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/ssl_key_handler.hpp')
-rw-r--r--include/ssl_key_handler.hpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp
index 1213758aa8..431dd84d3a 100644
--- a/include/ssl_key_handler.hpp
+++ b/include/ssl_key_handler.hpp
@@ -25,15 +25,11 @@ static EVP_PKEY* createEcKey();
// Trust chain related errors.`
inline bool isTrustChainError(int errnum)
{
- if ((errnum == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT) ||
- (errnum == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN) ||
- (errnum == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY) ||
- (errnum == X509_V_ERR_CERT_UNTRUSTED) ||
- (errnum == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE))
- {
- return true;
- }
- return false;
+ return (errnum == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT) ||
+ (errnum == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN) ||
+ (errnum == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY) ||
+ (errnum == X509_V_ERR_CERT_UNTRUSTED) ||
+ (errnum == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE);
}
inline bool validateCertificate(X509* const cert)