Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 73138 invoked by uid 500); 30 May 2003 20:58:58 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 73108 invoked by uid 500); 30 May 2003 20:58:58 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 30 May 2003 20:58:57 -0000 Message-ID: <20030530205857.97610.qmail@icarus.apache.org> From: wrowe@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/ssl mod_ssl.c ssl_engine_init.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N wrowe 2003/05/30 13:58:56 Modified: modules/ssl mod_ssl.c ssl_engine_init.c Log: Solve a pretty horrific bug in SSLCryptoDevice and other places where the config cmd processors should be examining the SSL context. We must initialize the SSL library before we can actually obtain any useful information from the SSL library. Revision Changes Path 1.80 +10 -1 httpd-2.0/modules/ssl/mod_ssl.c Index: mod_ssl.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.c,v retrieving revision 1.79 retrieving revision 1.80 diff -u -r1.79 -r1.80 --- mod_ssl.c 19 May 2003 14:48:47 -0000 1.79 +++ mod_ssl.c 30 May 2003 20:58:55 -0000 1.80 @@ -235,8 +235,17 @@ apr_pool_t *plog, apr_pool_t *ptemp) { - /* Preregister the malloc callbacks so cmds can make library calls */ + /* We must register the library in full, to ensure our configuration + * code can successfully test the SSL environment. + */ CRYPTO_malloc_init(); + ERR_load_crypto_strings(); + OpenSSL_add_all_algorithms(); +#if HAVE_ENGINE_LOAD_BUILTIN_ENGINES + ENGINE_load_builtin_engines(); +#endif + OPENSSL_load_builtin_modules(); + SSL_load_error_strings(); /* Register us to handle mod_log_config %c/%x variables */ ssl_var_log_config_register(pconf); 1.115 +3 -14 httpd-2.0/modules/ssl/ssl_engine_init.c Index: ssl_engine_init.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_init.c,v retrieving revision 1.114 retrieving revision 1.115 diff -u -r1.114 -r1.115 --- ssl_engine_init.c 30 May 2003 18:41:53 -0000 1.114 +++ ssl_engine_init.c 30 May 2003 20:58:55 -0000 1.115 @@ -107,18 +107,6 @@ /* - * Initialize SSL library - */ -static void ssl_init_SSLLibrary(server_rec *s) -{ - ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, - "Init: Initializing %s library", SSL_LIBRARY_NAME); - - SSL_load_error_strings(); - SSL_library_init(); -} - -/* * Handle the Temporary RSA Keys and DH Params */ @@ -274,11 +262,12 @@ ssl_init_Engine(base_server, p); #endif - ssl_init_SSLLibrary(base_server); - #if APR_HAS_THREADS ssl_util_thread_setup(p); #endif + + ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, + "Init: Initialized %s library", SSL_LIBRARY_NAME); /* * Seed the Pseudo Random Number Generator (PRNG)