package/sofia-sip: fix build with OpenSSL 4.0.0

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Cc: Gregory Dymarek <gregd72002@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Bernd Kuhls
2026-10-06 18:20:28 +02:00
committed by Thomas Petazzoni
parent d1c4544f15
commit 08ac0bfaaa

View File

@@ -0,0 +1,42 @@
From b21b4cc7d0dd4c3eae1a98a3fa38f4cdb2e5a385 Mon Sep 17 00:00:00 2001
From: Ravi Kant Sharma <ravi.kant.sharma@canonical.com>
Date: Fri, 17 Jul 2026 16:41:11 +0200
Subject: [PATCH] Fix build error with OpenSSL 4.0
Upstream: https://github.com/freeswitch/sofia-sip/pull/337
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
libsofia-sip-ua/stun/stun.c | 2 +-
m4/sac-openssl.m4 | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libsofia-sip-ua/stun/stun.c b/libsofia-sip-ua/stun/stun.c
index 22ca7c7..aa4b574 100644
--- a/libsofia-sip-ua/stun/stun.c
+++ b/libsofia-sip-ua/stun/stun.c
@@ -1368,7 +1368,7 @@ int stun_tls_callback(su_root_magic_t *m, su_wait_t *w, su_wakeup_arg_t *arg)
/* openssl initiation */
SSLeay_add_ssl_algorithms();
SSL_load_error_strings();
- ctx = SSL_CTX_new(TLSv1_client_method());
+ ctx = SSL_CTX_new(TLS_client_method());
self->sh_ctx = ctx;
if (ctx == NULL) {
diff --git a/m4/sac-openssl.m4 b/m4/sac-openssl.m4
index 289d3e1..76ba9f2 100644
--- a/m4/sac-openssl.m4
+++ b/m4/sac-openssl.m4
@@ -30,7 +30,7 @@ else
HAVE_OPENSSL=0
AC_MSG_WARN(OpenSSL crypto library was not found))
- AC_CHECK_LIB(ssl, TLSv1_method,,
+ AC_CHECK_LIB(ssl, TLS_method,,
HAVE_TLS=0
AC_MSG_WARN(OpenSSL protocol library was not found))
],[AC_MSG_WARN(OpenSSL include files were not found)],[#include <openssl/safestack.h>])
--
2.47.3