summaryrefslogtreecommitdiff
path: root/include/ssl_key_handler.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-01-07 20:36:26 +0300
committerEd Tanous <ed@tanous.net>2022-01-12 22:00:37 +0300
commit4ecc618ff610fd9044d6067b764570135b243c4b (patch)
tree571086aaa0be8d392daf6d634d9a6d3066a21725 /include/ssl_key_handler.hpp
parent9b6ffca5c1cafcc5406cf835390153a370dec4f6 (diff)
downloadbmcweb-4ecc618ff610fd9044d6067b764570135b243c4b.tar.xz
Enable const_cast checks
const_cast is an anti pattern. There are a few places we need to do it for interacting with C APIs, so enable the checks, and ignore the existing uses. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: If1748213992b97f5e3e04cf9b86a6fcafbb7cf06
Diffstat (limited to 'include/ssl_key_handler.hpp')
-rw-r--r--include/ssl_key_handler.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp
index dbe596a586..fcb79f24f6 100644
--- a/include/ssl_key_handler.hpp
+++ b/include/ssl_key_handler.hpp
@@ -232,6 +232,8 @@ inline int addExt(X509* cert, int nid, const char* value)
X509_EXTENSION* ex = nullptr;
X509V3_CTX ctx{};
X509V3_set_ctx(&ctx, cert, cert, nullptr, nullptr, 0);
+
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast)
ex = X509V3_EXT_conf_nid(nullptr, &ctx, nid, const_cast<char*>(value));
if (!ex)
{