From e00ca89b45235b44535b12d214e388be551e8f99 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 8 Jul 2021 17:12:33 -0700 Subject: [PATCH] sofia-sip: fix compilation -deprecated OpenSSL Signed-off-by: Rosen Penev --- libs/sofia-sip/Makefile | 2 +- .../patches/03-openssl-deprecated.patch | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 libs/sofia-sip/patches/03-openssl-deprecated.patch diff --git a/libs/sofia-sip/Makefile b/libs/sofia-sip/Makefile index f7b755df..f3a5c36e 100644 --- a/libs/sofia-sip/Makefile +++ b/libs/sofia-sip/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sofia-sip PKG_VERSION:=1.13.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/freeswitch/$(PKG_NAME)/tar.gz/v${PKG_VERSION}? diff --git a/libs/sofia-sip/patches/03-openssl-deprecated.patch b/libs/sofia-sip/patches/03-openssl-deprecated.patch new file mode 100644 index 00000000..ab1b316b --- /dev/null +++ b/libs/sofia-sip/patches/03-openssl-deprecated.patch @@ -0,0 +1,37 @@ +--- a/libsofia-sip-ua/tport/tport_tls.c ++++ b/libsofia-sip-ua/tport/tport_tls.c +@@ -44,6 +44,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -95,8 +96,10 @@ static int tls_ex_data_idx = -1; /* see + static void + tls_init_once(void) + { ++#if 0 + SSL_library_init(); + SSL_load_error_strings(); ++#endif + tls_ex_data_idx = SSL_get_ex_new_index(0, "sofia-sip private data", NULL, NULL, NULL); + } + +--- a/libsofia-sip-ua/tport/ws.c ++++ b/libsofia-sip-ua/tport/ws.c +@@ -100,11 +100,13 @@ static void pthreads_thread_id(CRYPTO_TH + + + void init_ssl(void) { ++#if 0 + SSL_library_init(); + + + OpenSSL_add_all_algorithms(); /* load & register cryptos */ + SSL_load_error_strings(); /* load all error messages */ ++#endif + ws_globals.ssl_method = SSLv23_server_method(); /* create server instance */ + ws_globals.ssl_ctx = SSL_CTX_new(ws_globals.ssl_method); /* create context */ + assert(ws_globals.ssl_ctx);