You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kamailio/debian/patches/upstream/tls-fix-restore-early-init....

36 lines
1.1 KiB

From: S-P Chan <shihping.chan@gmail.com>
Date: Sun, 25 Feb 2024 12:56:19 +0800
Subject: tls: fix restore early init
Cherry-pick from a02ca644e8
---
src/modules/tls/tls_mod.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/modules/tls/tls_mod.c b/src/modules/tls/tls_mod.c
index 6058592..664e35f 100644
--- a/src/modules/tls/tls_mod.c
+++ b/src/modules/tls/tls_mod.c
@@ -468,19 +468,13 @@ static int mod_child(int rank)
if(tls_disable || (tls_domains_cfg == 0))
return 0;
-#if OPENSSL_VERSION_NUMBER >= 0x010101000L
/*
* OpenSSL 3.x/1.1.1: create shared SSL_CTX* in thread executor
- * to avoid init of libssl in thread#1
+ * to avoid init of libssl in thread#1: ksr_tls_threads_mode = 1
*/
- if(rank == PROC_INIT && ksr_tls_threads_mode != 0) {
- return run_thread4PP((_thread_proto4PP)mod_child_hook, &rank, NULL);
- }
-#else
if(rank == PROC_INIT) {
- return mod_child_hook(&rank, NULL);
+ return run_thread4PP((_thread_proto4PP)mod_child_hook, &rank, NULL);
}
-#endif /* OPENSSL_VERSION_NUMBER */
#ifndef OPENSSL_NO_ENGINE
/*