Skip to content

Commit

Permalink
sofia-sip: fix compilation -deprecated OpenSSL
Browse files Browse the repository at this point in the history
Signed-off-by: Rosen Penev <rosenp@gmail.com>
  • Loading branch information
neheb committed Jul 9, 2021
1 parent 20abe8c commit 403e337
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libs/sofia-sip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=sofia-sip

PKG_VERSION:=1.13.3
PKG_RELEASE:=2
PKG_RELEASE:=3

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/freeswitch/$(PKG_NAME)/tar.gz/v${PKG_VERSION}?
Expand Down
37 changes: 37 additions & 0 deletions libs/sofia-sip/patches/03-openssl-deprecated.patch
Original file line number Diff line number Diff line change
@@ -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 <openssl/lhash.h>
#include <openssl/bn.h>
+#include <openssl/dh.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include <openssl/ssl.h>
@@ -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);

0 comments on commit 403e337

Please sign in to comment.