From 730b2fcf013f0612f32006092bb0c72e39e714cd Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Mon, 13 Jan 2003 17:10:42 +0000 Subject: [PATCH] After introducing tests in the cmds, we lose the absolute authority of the CRYPTO_malloc_init() which must happen the moment we load the module and prior to *any* ssl library fn invocation. Moved the CRYPTO_malloc_init() into the ssl_register_hooks() function, the absolute first call made into any loaded module. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98252 13f79535-47bb-0310-9956-ffa450edef68 --- modules/ssl/mod_ssl.c | 3 +++ modules/ssl/ssl_engine_init.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c index 9aa52a99dd..6a8062a9f6 100644 --- a/modules/ssl/mod_ssl.c +++ b/modules/ssl/mod_ssl.c @@ -212,6 +212,9 @@ static int ssl_hook_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp) { + /* Preregister the malloc callbacks so cmds can make library calls */ + CRYPTO_malloc_init(); + /* Register us to handle mod_log_config %c/%x variables */ ssl_var_log_config_register(pconf); #if 0 /* XXX */ diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c index 402ce0cbf4..45dec92180 100644 --- a/modules/ssl/ssl_engine_init.c +++ b/modules/ssl/ssl_engine_init.c @@ -114,7 +114,6 @@ static void ssl_init_SSLLibrary(server_rec *s) ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, "Init: Initializing %s library", SSL_LIBRARY_NAME); - CRYPTO_malloc_init(); SSL_load_error_strings(); SSL_library_init(); } -- 2.40.0