Module: kamailio
Branch: master
Commit: 6d154fbb2ff1d2941316281fad120b5db219deb1
URL:
https://github.com/kamailio/kamailio/commit/6d154fbb2ff1d2941316281fad120b5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-10-03T11:36:28+02:00
tls: set random number engine to fastrand for libssl1.1+
---
Modified: src/modules/tls/tls_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6d154fbb2ff1d2941316281fad120b5…
Patch:
https://github.com/kamailio/kamailio/commit/6d154fbb2ff1d2941316281fad120b5…
---
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;