Module: kamailio
Branch: master
Commit: 966513b374eef598434c5310a43eac2735adfd2e
URL:
https://github.com/kamailio/kamailio/commit/966513b374eef598434c5310a43eac2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-07-18T10:43:48+02:00
tls: print ssl memory functions if they cannot be set
---
Modified: modules/tls/tls_init.c
---
Diff:
https://github.com/kamailio/kamailio/commit/966513b374eef598434c5310a43eac2…
Patch:
https://github.com/kamailio/kamailio/commit/966513b374eef598434c5310a43eac2…
---
diff --git a/modules/tls/tls_init.c b/modules/tls/tls_init.c
index 9517329..ece8863 100644
--- a/modules/tls/tls_init.c
+++ b/modules/tls/tls_init.c
@@ -478,6 +478,9 @@ static int init_tls_compression(void)
*/
int tls_pre_init(void)
{
+ void *(*mf)(size_t) = NULL;
+ void *(*rf)(void *, size_t) = NULL;
+ void (*ff)(void *) = NULL;
/*
* this has to be called before any function calling CRYPTO_malloc,
* CRYPTO_malloc will set allow_customize in openssl to 0
@@ -488,6 +491,8 @@ int tls_pre_init(void)
if (!CRYPTO_set_mem_functions(ser_malloc, ser_realloc, ser_free)) {
#endif
ERR("Unable to set the memory allocation functions\n");
+ CRYPTO_get_mem_functions(&mf, &rf, &ff);
+ ERR("libssl current mem functions - m: %p r: %p f: %p\n", mf, rf, ff);
ERR("Be sure tls module is loaded before any other module using libssl"
" (can be loaded first to be safe)\n");
return -1;