]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
build: Silence deprecation warnings from OpenSSL 3 46330/head
authorAdam C. Emerson <aemerson@redhat.com>
Wed, 18 May 2022 22:06:01 +0000 (18:06 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Wed, 18 May 2022 22:06:01 +0000 (18:06 -0400)
The OpenSSL developers suggest that anyone wishing to continue using
low-level functions may either live with the warnings, silence them,
or switch to high level functions.

As high level functions do their own memory allocation, switching to
them may lead to performance regressions.

We do not wish to have deprecation warnings filling up our compiler
outputs when searching for other messages.

So silencing the warnings, at least for now, seems the least bad option.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/auth/Crypto.cc
src/common/ceph_crypto.cc
src/common/ceph_crypto.h
src/common/openssl_opts_handler.cc
src/rgw/rgw_rest_sts.h

index c96222feafcb864ca44ca8fc215417cdac302514..ce666e8bdc8c3c8f266f133927136c2ede325d9b 100644 (file)
 #include "common/debug.h"
 #include <errno.h>
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
 using std::ostringstream;
 using std::string;
 
@@ -40,6 +46,7 @@ using ceph::bufferlist;
 using ceph::bufferptr;
 using ceph::Formatter;
 
+
 // use getentropy() if available. it uses the same source of randomness
 // as /dev/urandom without the filesystem overhead
 #ifdef HAVE_GETENTROPY
@@ -603,3 +610,6 @@ CryptoHandler *CryptoHandler::create(int type)
     return NULL;
   }
 }
+
+#pragma clang diagnostic pop
+#pragma GCC diagnostic pop
index e1f8705c9e6545f3b2277d0b45c068115e8f4b91..d658edd6af1296328716821f24da804934dd6ecc 100644 (file)
 #  include <openssl/err.h>
 #endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
 namespace TOPNSPC::crypto::ssl {
 
 #if OPENSSL_VERSION_NUMBER < 0x10100000L
@@ -213,3 +219,6 @@ void ssl::OpenSSLDigest::Final(unsigned char *digest) {
 }
 
 }
+
+#pragma clang diagnostic pop
+#pragma GCC diagnostic pop
index 2feced03a99a5a1391489b4eee118bca563a7065..dd1b14ffab69ef10ced6213e82878a4da7b22a44 100644 (file)
 
 #include "include/ceph_assert.h"
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
 extern "C" {
   const EVP_MD *EVP_md5(void);
   const EVP_MD *EVP_sha1(void);
@@ -202,4 +208,7 @@ auto digest(const ceph::buffer::list& bl)
 }
 }
 
+#pragma clang diagnostic pop
+#pragma GCC diagnostic pop
+
 #endif
index bb5f27e6b26b1106b6f2070fe6ef7bd34d213573..81d0c478651a6d9fd59d6f120d2a4e86ca560f9a 100644 (file)
@@ -113,7 +113,14 @@ void load_module(const string &engine_conf)
   }
 
   OPENSSL_load_builtin_modules();
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
   ENGINE_load_builtin_engines();
+#pragma clang diagnostic pop
+#pragma GCC diagnostic pop
 
   if (CONF_modules_load(
           conf, nullptr,
index 754b292616ed955d3c1b7067d9ab13578053856a..54f0cfff9f895fde98ff17633c8b47c204796b28 100644 (file)
@@ -8,9 +8,17 @@
 #include "rgw_rest.h"
 #include "rgw_sts.h"
 #include "rgw_web_idp.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
 #include "jwt-cpp/jwt.h"
+#pragma clang diagnostic pop
+#pragma GCC diagnostic pop
 #include "rgw_oidc_provider.h"
 
+
 namespace rgw::auth::sts {
 
 class WebTokenEngine : public rgw::auth::Engine {
@@ -227,3 +235,4 @@ public:
                                const rgw::auth::StrategyRegistry&,
                                const std::string&) override;
 };
+