Module: kamailio
Branch: 5.7
Commit: 253f13f18ec6853764d950d58f467c331d03425a
URL:
https://github.com/kamailio/kamailio/commit/253f13f18ec6853764d950d58f467c3…
Author: S-P Chan <shihping.chan(a)gmail.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-02-12T07:52:26+01:00
tls: restore default to bypass thread guards
- restore <= 5.7.3 behaviour
- require user to opt-in to libssl thread-guards
with tls_threads_mode = 1|2
---
Modified: src/modules/tls/tls_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/253f13f18ec6853764d950d58f467c3…
Patch:
https://github.com/kamailio/kamailio/commit/253f13f18ec6853764d950d58f467c3…
---
diff --git a/src/modules/tls/tls_mod.c b/src/modules/tls/tls_mod.c
index beaf1b7b70b..3359aaffdcc 100644
--- a/src/modules/tls/tls_mod.c
+++ b/src/modules/tls/tls_mod.c
@@ -451,9 +451,9 @@ static int mod_child(int rank)
#if OPENSSL_VERSION_NUMBER >= 0x010101000L
/*
* OpenSSL 3.x/1.1.1: create shared SSL_CTX* in worker to avoid init of
- * libssl in rank 0(thread#1)
+ * libssl in rank 0(thread#1). Requires tls_threads_mode = 1 config.
*/
- if(rank == PROC_SIPINIT) {
+ if((rank == PROC_SIPINIT && ksr_tls_threads_mode) || (rank == PROC_INIT
&& !ksr_tls_threads_mode)) {
#else
if(rank == PROC_INIT) {
#endif