Skip to content

Commit e00ca89

Browse files
committed
sofia-sip: fix compilation -deprecated OpenSSL
Signed-off-by: Rosen Penev <rosenp@gmail.com>
1 parent 3891a2e commit e00ca89

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

libs/sofia-sip/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
1010
PKG_NAME:=sofia-sip
1111

1212
PKG_VERSION:=1.13.4
13-
PKG_RELEASE:=1
13+
PKG_RELEASE:=2
1414

1515
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
1616
PKG_SOURCE_URL:=https://codeload.github.com/freeswitch/$(PKG_NAME)/tar.gz/v${PKG_VERSION}?
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
--- a/libsofia-sip-ua/tport/tport_tls.c
2+
+++ b/libsofia-sip-ua/tport/tport_tls.c
3+
@@ -44,6 +44,7 @@
4+
5+
#include <openssl/lhash.h>
6+
#include <openssl/bn.h>
7+
+#include <openssl/dh.h>
8+
#include <openssl/x509.h>
9+
#include <openssl/x509v3.h>
10+
#include <openssl/ssl.h>
11+
@@ -95,8 +96,10 @@ static int tls_ex_data_idx = -1; /* see
12+
static void
13+
tls_init_once(void)
14+
{
15+
+#if 0
16+
SSL_library_init();
17+
SSL_load_error_strings();
18+
+#endif
19+
tls_ex_data_idx = SSL_get_ex_new_index(0, "sofia-sip private data", NULL, NULL, NULL);
20+
}
21+
22+
--- a/libsofia-sip-ua/tport/ws.c
23+
+++ b/libsofia-sip-ua/tport/ws.c
24+
@@ -100,11 +100,13 @@ static void pthreads_thread_id(CRYPTO_TH
25+
26+
27+
void init_ssl(void) {
28+
+#if 0
29+
SSL_library_init();
30+
31+
32+
OpenSSL_add_all_algorithms(); /* load & register cryptos */
33+
SSL_load_error_strings(); /* load all error messages */
34+
+#endif
35+
ws_globals.ssl_method = SSLv23_server_method(); /* create server instance */
36+
ws_globals.ssl_ctx = SSL_CTX_new(ws_globals.ssl_method); /* create context */
37+
assert(ws_globals.ssl_ctx);

0 commit comments

Comments
 (0)