I had this issue with CentOS 7.3 and chalked it up to the openssl 1.0.1e bug mentioned on the list https://lists.kamailio.org/pipermail/sr-users/2013-August/079381.html

However I just updated to CentOS 7.4 with openssl 1.0.2k-8 and the issue still exists with Kamailio 4.4.6-2.2. I've tried moving the loadmodule "tls.so" to the top as well.

ERROR: tls [tls_init.c:526]: tls_pre_init(): Unable to set the memory allocation functions
ERROR: tls [tls_init.c:528]: tls_pre_init(): libssl current mem functions - m: 0x7fc56d19c0c0 r: 0x7fc56d19c5a0 f: 0x7fc56d19c4c0
ERROR: tls [tls_init.c:530]: tls_pre_init(): Be sure tls module is loaded before any other module using libssl (can be loaded first to be safe)

Does anybody have TLS working with RHEL 7 or CentOS 7?

Thanks,
Ryan