Module: kamailio
Branch: 5.2
Commit: e1b740b43f0fda7bcbf4b36c2816d318193acf54
URL:
https://github.com/kamailio/kamailio/commit/e1b740b43f0fda7bcbf4b36c2816d31…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-10-07T11:43:55+02:00
tls: set random number engine to fastrand for libssl1.1+
(cherry picked from commit 6d154fbb2ff1d2941316281fad120b5db219deb1)
(cherry picked from commit 2935b65d7d909f8ac355b8f2b5404494c4ec2c6b)
---
Modified: src/modules/tls/tls_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e1b740b43f0fda7bcbf4b36c2816d31…
Patch:
https://github.com/kamailio/kamailio/commit/e1b740b43f0fda7bcbf4b36c2816d31…
---
diff --git a/src/modules/tls/tls_mod.c b/src/modules/tls/tls_mod.c
index 87759249b2..75d8aa8fd2 100644
--- a/src/modules/tls/tls_mod.c
+++ b/src/modules/tls/tls_mod.c
@@ -561,6 +561,12 @@ int mod_register(char *path, int *dlflags, void *p1, void *p2)
return -1;
register_tls_hooks(&tls_h);
+
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+ LM_DBG("setting fastrand random engine\n");
+ RAND_set_rand_method(RAND_ksr_fastrand_method());
+#endif
+
sr_kemi_modules_add(sr_kemi_tls_exports);
return 0;