[Asterisk-code-review] openssl: Supress deprecation warnings from OpenSSL 3.0 (asterisk[16])

Joshua Colp asteriskteam at digium.com
Mon Mar 28 11:33:20 CDT 2022


Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/18257 )

Change subject: openssl: Supress deprecation warnings from OpenSSL 3.0
......................................................................

openssl: Supress deprecation warnings from OpenSSL 3.0

There is work going on to update our OpenSSL usage to avoid the
deprecated functions but in the meantime make it possible to compile
in devmode.

Change-Id: Ib082eb8b3751f0185d8aa8fe127da664c93f0726
---
M res/res_crypto.c
M res/res_rtp_asterisk.c
2 files changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  Kevin Harwell: Looks good to me, but someone else must approve
  Benjamin Keith Ford: Looks good to me, approved



diff --git a/res/res_crypto.c b/res/res_crypto.c
index 65ebcc5..a11182b 100644
--- a/res/res_crypto.c
+++ b/res/res_crypto.c
@@ -35,6 +35,8 @@
 
 #include <dirent.h>                 /* for closedir, opendir, readdir, DIR */
 
+#define OPENSSL_SUPPRESS_DEPRECATED 1
+
 #include <openssl/aes.h>            /* for AES_decrypt, AES_encrypt, AES_set... */
 #include <openssl/err.h>            /* for ERR_print_errors_fp */
 #include <openssl/ssl.h>            /* for NID_sha1, RSA */
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 31b9dc8..94c63f1 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -47,6 +47,7 @@
 #include <math.h>
 
 #ifdef HAVE_OPENSSL
+#define OPENSSL_SUPPRESS_DEPRECATED 1
 #include <openssl/opensslconf.h>
 #include <openssl/opensslv.h>
 #if !defined(OPENSSL_NO_SRTP) && (OPENSSL_VERSION_NUMBER >= 0x10001000L)

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18257
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ib082eb8b3751f0185d8aa8fe127da664c93f0726
Gerrit-Change-Number: 18257
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Bright <sean at seanbright.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220328/9049369d/attachment.html>


More information about the asterisk-code-review mailing list