Module: kamailio
Branch: 5.8
Commit: aa8fcf9ec76e7c4543db22de6de5ef62374c80be
URL: 
https://github.com/kamailio/kamailio/commit/aa8fcf9ec76e7c4543db22de6de5ef62374c80be

Author: S-P Chan <shihping.c...@gmail.com>
Committer: S-P Chan <shihping.c...@gmail.com>
Date: 2024-02-25T12:57:19+08:00

tls: fix restore early init

---

Modified: src/modules/tls/tls_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/aa8fcf9ec76e7c4543db22de6de5ef62374c80be.diff
Patch: 
https://github.com/kamailio/kamailio/commit/aa8fcf9ec76e7c4543db22de6de5ef62374c80be.patch

---

diff --git a/src/modules/tls/tls_mod.c b/src/modules/tls/tls_mod.c
index 463814720b8..136f0e2deb2 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
        /*

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to