Skip to content

Commit

Permalink
tls: fix OpenSSL 1.1.1 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
space88man committed Feb 25, 2024
1 parent aa8fcf9 commit b98718c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/modules/tls/tls_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,14 @@ int mod_register(char *path, int *dlflags, void *p1, void *p2)
* GH #3695: OpenSSL 1.1.1 historical note: it is no longer
* needed to replace RAND with cryptorand
*/
#if OPENSSL_VERSION_NUMBER >= 0x10100000L \
&& OPENSSL_VERSION_NUMBER < 0x030000000L
if(ksr_tls_threads_mode == 0) {
LM_WARN("OpenSSL 1.1.1 setting cryptorand random engine\n");
RAND_set_rand_method(RAND_ksr_cryptorand_method());
}
#endif

sr_kemi_modules_add(sr_kemi_tls_exports);

return 0;
Expand Down

0 comments on commit b98718c

Please sign in to comment.