### Description
This is an umbrella ticket to address issues with the WIP `tls_wolfssl` module
### Expected behavior
The module behaves robustly under load testing and various configurations
and thus can be accepted long-term in kamailio
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3160
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3160(a)github.com>
Compile tls_wolfssl error:
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
./configure: line 6164: syntax error near unexpected token `2.4.2'
./configure: line 6164: `LT_PREREQ(2.4.2)'
make[2]: *** [Makefile:21: ../../../misc/external/wolfssl/build/include/wolfssl/options.h] Error 2
make[1]: *** [Makefile:508: modules] Error 1
make[1]: Leaving directory '/usr/local/src/kamailio-5.7/src'
make: *** [Makefile:34: all] Error 2
Please check, thanks
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3610
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3610(a)github.com>
Module: kamailio
Branch: 5.7
Commit: bbbcb27040c632642c50209455efbb8225888723
URL: https://github.com/kamailio/kamailio/commit/bbbcb27040c632642c50209455efbb8…
Author: S-P Chan <shihping.chan(a)gmail.com>
Committer: S-P Chan <shihping.chan(a)gmail.com>
Date: 2024-01-14T14:44:47+08:00
tls: remove thread-enablement on EVP_RAND_CTX
- with late initialisation it is not necessary to enable thread locking
on EVP_RAND_CTX
- the function remains but is not used in case requirements change
with OpenSSL >= 3.2
(cherry-pick from 8dffc45ee91aeed839efb38d17040359dcac953a)
---
Modified: src/modules/tls/tls_init.c
---
Diff: https://github.com/kamailio/kamailio/commit/bbbcb27040c632642c50209455efbb8…
Patch: https://github.com/kamailio/kamailio/commit/bbbcb27040c632642c50209455efbb8…
---
diff --git a/src/modules/tls/tls_init.c b/src/modules/tls/tls_init.c
index 65f5ae72c65..629f69ad6b3 100644
--- a/src/modules/tls/tls_init.c
+++ b/src/modules/tls/tls_init.c
@@ -731,6 +731,12 @@ int tls_pre_init(void)
* - executed before any mod_init()
*/
#if OPENSSL_VERSION_NUMBER >= 0x030000000L
+/*
+ * With late initialisation it is not necessary to
+ * enable threading on the EVP_RAND_CTX. This function
+ * left here in case more complex requirements arise in
+ * OpenSSL >= 3.2.
+ */
long tls_h_mod_randctx(void *) {
do {
OSSL_LIB_CTX *osslglobal = NULL;
@@ -768,7 +774,7 @@ long tls_h_mod_randctx(void *) {
return 0L;
}
-#endif
+#endif /* OPENSSL_VERSION_NUMBER */
int tls_h_mod_pre_init_f(void)
{
@@ -794,14 +800,21 @@ int tls_h_mod_pre_init_f(void)
SSL_load_error_strings();
#endif
+#if 0
#if OPENSSL_VERSION_NUMBER >= 0x030000000L
+ /*
+ * With deferred initialisation it is not necessary to enable threading
+ * on the EVP_RAND_CTX. We leave this block here as an example of how
+ * to do it in case of future requirements.
+ */
pthread_t tid;
long rl;
pthread_create(&tid, NULL, (void *(*)(void *))tls_h_mod_randctx, NULL);
pthread_join(tid, (void **)&rl);
if ((int)rl)
return (int)rl;
-#endif
+#endif /* OPENSSL_VERSION_NUMBER */
+#endif /* 0 */
tls_mod_preinitialized = 1;
return 0;
Module: kamailio
Branch: master
Commit: 8dffc45ee91aeed839efb38d17040359dcac953a
URL: https://github.com/kamailio/kamailio/commit/8dffc45ee91aeed839efb38d1704035…
Author: S-P Chan <shihping.chan(a)gmail.com>
Committer: S-P Chan <shihping.chan(a)gmail.com>
Date: 2024-01-14T14:08:03+08:00
tls: remove thread-enablement on EVP_RAND_CTX
- with late initialisation it is not necessary to enable thread locking
on EVP_RAND_CTX
- the function remains but is not used in case requirements change
with OpenSSL >= 3.2
---
Modified: src/modules/tls/tls_init.c
---
Diff: https://github.com/kamailio/kamailio/commit/8dffc45ee91aeed839efb38d1704035…
Patch: https://github.com/kamailio/kamailio/commit/8dffc45ee91aeed839efb38d1704035…
---
diff --git a/src/modules/tls/tls_init.c b/src/modules/tls/tls_init.c
index d077b41e08a..bb1d0f19207 100644
--- a/src/modules/tls/tls_init.c
+++ b/src/modules/tls/tls_init.c
@@ -733,6 +733,12 @@ int tls_pre_init(void)
* - executed before any mod_init()
*/
#if OPENSSL_VERSION_NUMBER >= 0x030000000L
+/*
+ * With late initialisation it is not necessary to
+ * enable threading on the EVP_RAND_CTX. This function
+ * left here in case more complex requirements arise in
+ * OpenSSL >= 3.2.
+ */
long tls_h_mod_randctx(void *) {
do {
OSSL_LIB_CTX *osslglobal = NULL;
@@ -770,7 +776,7 @@ long tls_h_mod_randctx(void *) {
return 0L;
}
-#endif
+#endif /* OPENSSL_VERSION_NUMBER */
int tls_h_mod_pre_init_f(void)
{
@@ -796,14 +802,21 @@ int tls_h_mod_pre_init_f(void)
SSL_load_error_strings();
#endif
+#if 0
#if OPENSSL_VERSION_NUMBER >= 0x030000000L
+ /*
+ * With deferred initialisation it is not necessary to enable threading
+ * on the EVP_RAND_CTX. We leave this block here as an example of how
+ * to do it in case of future requirements.
+ */
pthread_t tid;
long rl;
pthread_create(&tid, NULL, (void *(*)(void *))tls_h_mod_randctx, NULL);
pthread_join(tid, (void **)&rl);
if ((int)rl)
return (int)rl;
-#endif
+#endif /* OPENSSL_VERSION_NUMBER */
+#endif /* 0 */
tls_mod_preinitialized = 1;
return 0;