From 394d60033a2ce25d99d0fb13bb36bd13a4d8cb5e Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Tue, 2 Dec 2003 14:11:20 +0000 Subject: [PATCH] Backport from HEAD: * ssl_engine_log.c (ssl_log_ssl_error): Use the thread-safe interface for retrieving error strings. * mod_ssl.c (ssl_cleanup_pre_config): Don't free the error strings, since they can't be loaded again once. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@101951 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ STATUS | 8 +------- modules/ssl/ssl_engine_init.c | 1 - modules/ssl/ssl_engine_log.c | 5 +++-- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/CHANGES b/CHANGES index f400e00ee00..f54fd82e4bf 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.49 + *) mod_ssl: Use human-readable OpenSSL error strings in logs; use + thread-safe interface for retrieving error strings. [Joe Orton] + *) mod_expires: Initialize ExpiresDefault to NULL instead of "" to avoid reporting an Internal Server error if it is used without having been set in the httpd.conf file. PR: 23748, 24459 diff --git a/STATUS b/STATUS index 556f65f0d16..51ebf6d7013 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2003/12/02 13:15:01 $] +Last modified at [$Date: 2003/12/02 14:11:19 $] Release: @@ -87,12 +87,6 @@ PATCHES TO BACKPORT FROM 2.1 modules/ssl/ssl_util.c: r1.40 +1: jorton, trawick, stoddard - * Fix logging of human-readable error strings in mod_ssl, and use the - thread-safe interface for retrieving them. - modules/ssl/ssl_engine_log.c: r1.23 - modules/ssl/mod_ssl.c: r1.88 - +1: jorton, trawick, stoddard - * Prevent mod_proxy from sending an invalid status-line to clients in some cases. modules/proxy/proxy_http.c: r1.172 diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c index 8e4e615c84d..2e377154439 100644 --- a/modules/ssl/ssl_engine_init.c +++ b/modules/ssl/ssl_engine_init.c @@ -1260,7 +1260,6 @@ apr_status_t ssl_init_ModuleKill(void *data) /* * Try to kill the internals of the SSL library. */ - ERR_free_strings(); ERR_remove_state(0); EVP_cleanup(); diff --git a/modules/ssl/ssl_engine_log.c b/modules/ssl/ssl_engine_log.c index 6ce8d9d02b4..3ea3b50e3ed 100644 --- a/modules/ssl/ssl_engine_log.c +++ b/modules/ssl/ssl_engine_log.c @@ -118,8 +118,9 @@ void ssl_log_ssl_error(const char *file, int line, int level, server_rec *s) unsigned long e; while ((e = ERR_get_error())) { - char *err, *annotation; - err = ERR_error_string(e, NULL); + char err[256], *annotation; + + ERR_error_string_n(e, err, sizeof err); annotation = ssl_log_annotation(err); if (annotation) { -- 2.47.2