]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* modules/ssl/ssl_engine_io.c (ssl_io_filter_cleanup): Don't try and
authorJoe Orton <jorton@apache.org>
Thu, 15 Apr 2004 19:41:39 +0000 (19:41 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 15 Apr 2004 19:41:39 +0000 (19:41 +0000)
send an SSL shutdown from a pool cleanup.

PR: 27945
Reviewed by: Jeff Trawick, Madhusudan Mathihalli

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@103396 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/ssl/ssl_engine_io.c

diff --git a/CHANGES b/CHANGES
index 1c0d19d287a28d92fbc68a7e87c9e4bd78f0363d..ff933a7da534e289bb46b80c2cc6fb3d23dce8bf 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.50
 
+  *) mod_ssl: Fix potential segfaults when performing SSL shutdown from
+     a pool cleanup.  PR 27945.  [Joe Orton]
+
   *) Add forensic logging module (mod_log_forensic).
      [Ben Laurie]
 
diff --git a/STATUS b/STATUS
index 1ab374cad6add9767ea9e1d5b405c3097c974101..a11079d9950a4a7aff42f555dad613ee79c6aa0b 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2004/04/14 14:45:28 $]
+Last modified at [$Date: 2004/04/15 19:41:38 $]
 
 Release:
 
@@ -142,10 +142,6 @@ PATCHES TO BACKPORT FROM 2.1
          modules/experimental/util_ldap.c: r1.22, r1.24
        +1: bnicholes, minfrin
     
-    *) mod_ssl: Fix segfaults when doing shutdown from a cleanup.
-       http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/ssl/ssl_engine_io.c?r1=1.121&r2=1.122
-       +1: jorton, trawick, madhum
-
     *) (re-)add support for RewriteRules in <Proxy> containers. PR 27985
          modules/mappers/mod_rewrite.c: r1.254
        +1: nd, trawick
index 93e85460dd0ac3f402b90f99104a1ac1e3fd6b95..1304f7f5a4dbaf47d7d2f86398d35e2d590f9a90 100644 (file)
@@ -983,22 +983,20 @@ static apr_status_t ssl_filter_io_shutdown(ssl_filter_ctx_t *filter_ctx,
 
 static apr_status_t ssl_io_filter_cleanup(void *data)
 {
-    apr_status_t ret;
-    ssl_filter_ctx_t *filter_ctx = (ssl_filter_ctx_t *)data;
-    conn_rec *c;
+    ssl_filter_ctx_t *filter_ctx = data;
 
-    if (!filter_ctx->pssl) {
-        /* already been shutdown */
-        return APR_SUCCESS;
-    }
+    if (filter_ctx->pssl) {
+        conn_rec *c = (conn_rec *)SSL_get_app_data(filter_ctx->pssl);
+        SSLConnRec *sslconn = myConnConfig(c);
 
-    c = (conn_rec *)SSL_get_app_data(filter_ctx->pssl);
-    if ((ret = ssl_filter_io_shutdown(filter_ctx, c, 0)) != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_INFO, ret, NULL,
-                     "SSL filter error shutting down I/O");
-    }
+        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
+                     "SSL connection destroyed without being closed");
 
-    return ret;
+        SSL_free(filter_ctx->pssl);
+        sslconn->ssl = filter_ctx->pssl = NULL;
+    }
+  
+    return APR_SUCCESS;
 }
 
 /*