diff options
author | Szymon Dompke <szymon.dompke@intel.com> | 2022-03-01 16:04:14 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-03-03 10:18:55 +0300 |
commit | a327dc5943ab2ae32f9d202cd77ac27d89d6a650 (patch) | |
tree | 46d0c6c344d7b3cb943b40075cd6374dc82f0716 /include/ssl_key_handler.hpp | |
parent | 4656063c7a0e7fa12597e8f2ee7e891b62cb69e2 (diff) | |
download | bmcweb-a327dc5943ab2ae32f9d202cd77ac27d89d6a650.tar.xz |
Fix clang warnings related to OpenSSL 1.x
When CI tests are run locally on machine without OpenSSL 3.0, there are
some warnings during clang-tidy scan. They are related to unsupported
c-style code (implicit bool/int conversion, casting, and varagrs
functions). This change is fixing all of them, without changing
functionality.
Testing done:
- running docker image with UTs on local Ubuntu machine with SSL 1.1 is
passing all tests, and no clang errors are reported.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Change-Id: I5ec91db8f02f487786811afad77080137bab3c9a
Diffstat (limited to 'include/ssl_key_handler.hpp')
-rw-r--r-- | include/ssl_key_handler.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp index 30145f8136..1213758aa8 100644 --- a/include/ssl_key_handler.hpp +++ b/include/ssl_key_handler.hpp @@ -350,12 +350,12 @@ EVP_PKEY* createEcKey() pKey = EVP_PKEY_new(); if (pKey != nullptr) { - if (EVP_PKEY_assign_EC_KEY(pKey, myecc)) + if (EVP_PKEY_assign(pKey, EVP_PKEY_EC, myecc) != 0) { /* pKey owns myecc from now */ if (EC_KEY_check_key(myecc) <= 0) { - fprintf(stderr, "EC_check_key failed.\n"); + std::cerr << "EC_check_key failed.\n"; } } } |