summaryrefslogtreecommitdiff
path: root/include/ssl_key_handler.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2021-02-23 23:52:50 +0300
committerEd Tanous <edtanous@google.com>2021-02-24 00:29:16 +0300
commitb00dcc27587267e18d3abdee82f1ed7b39744d02 (patch)
tree90d059b0e265fe5b3d5bf36bcd59eec7880d1b3e /include/ssl_key_handler.hpp
parent738c1e610e3b3e3bf1dd4cc80965dbceefeeddf1 (diff)
downloadbmcweb-b00dcc27587267e18d3abdee82f1ed7b39744d02.tar.xz
Fix the build on clang-11
Clang tidy 11 got some really neat checks that do a much better job. Unfortunately, this, combined with the change in how std::executors has defined how callbacks should work differently in the past, which we picked up in 1.73, and now in theory we have recursion in a bunch of our IO loops that we have to break manually. In practice, this is unlikely to matter, as there's almost a 0% chance that we go through N thousand requests without ever starving the IO buffer. Other changes to make this build include: 1. Adding inline on the appropriate places where declared in a header. 2. Removing an Openssl call that did nothing, as the result was immediately overwritten. 3. Declaring the subproject dependencies as system dependencies, which silences the clang-tidy checks for those projects. Tested: Code builds again, clang-tidy passes Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ic11b1002408e8ac19a17a955e9477cac6e0d7504
Diffstat (limited to 'include/ssl_key_handler.hpp')
-rw-r--r--include/ssl_key_handler.hpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp
index 39e83d7f85..24e40a48af 100644
--- a/include/ssl_key_handler.hpp
+++ b/include/ssl_key_handler.hpp
@@ -205,8 +205,7 @@ inline X509* loadCert(const std::string& filePath)
inline int addExt(X509* cert, int nid, const char* value)
{
X509_EXTENSION* ex = nullptr;
- X509V3_CTX ctx;
- X509V3_set_ctx_nodb(&ctx);
+ X509V3_CTX ctx{};
X509V3_set_ctx(&ctx, cert, cert, nullptr, nullptr, 0);
ex = X509V3_EXT_conf_nid(nullptr, &ctx, nid, const_cast<char*>(value));
if (!ex)