]> granicus.if.org Git - apache/commitdiff
Merge r1734006 from trunk:
authorYann Ylavic <ylavic@apache.org>
Thu, 10 Mar 2016 12:31:13 +0000 (12:31 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 10 Mar 2016 12:31:13 +0000 (12:31 +0000)
mod_ssl: Don't lose track of the SSL context if the ssl_run_pre_handshake()
hook returns an error.

Submitted by: minfrin
Reviewed by: minfrin, jim, ylavic
Backported by: ylavic

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

CHANGES
STATUS
modules/ssl/mod_ssl.c

diff --git a/CHANGES b/CHANGES
index b2166c00add052f261eb0f671a99c3fbb8febc28..6a6fe5953b09d349cfabf39e1b5e1dbc9ac197f9 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.19
 
+  *) mod_ssl: Don't lose track of the SSL context if the ssl_run_pre_handshake()
+     hook returns an error. [Graham Leggett]
+
   *) mod_rewrite: Add QSL|qslast flag to allow rewrites to files with
      literal question marks in their names. PR 58777. [Eric Covener]
 
diff --git a/STATUS b/STATUS
index 013cb6448f74be9bc05140daa29c83aabc43e9aa..57009d99122853c410b42a5fbd07e064a4261de4 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -112,12 +112,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_ssl: Don't lose track of the SSL context if the ssl_run_pre_handshake()
-     hook returns an error.
-     trunk patch: http://svn.apache.org/r1734006
-     2.4.x patch: trunk patch works (modulo CHANGES)
-     +1: minfrin, jim, ylavic
-
   *) mod_rewrite: bug in recently backported r1734125.
      trunk patch: http://svn.apache.org/r1734294.
      2.4.x patch: trunk works
index 7506b9d218aca869264918218cfb0614461dbf56..835bf552512996bb239ebbb53f8674fe37428e05 100644 (file)
@@ -468,7 +468,7 @@ int ssl_init_ssl_connection(conn_rec *c, request_rec *r)
      * attach this to the socket. Additionally we register this attachment
      * so we can detach later.
      */
-    if (!(ssl = SSL_new(mctx->ssl_ctx))) {
+    if (!(sslconn->ssl = ssl = SSL_new(mctx->ssl_ctx))) {
         ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(01962)
                       "Unable to create a new SSL connection from the SSL "
                       "context");
@@ -497,8 +497,6 @@ int ssl_init_ssl_connection(conn_rec *c, request_rec *r)
     SSL_set_app_data(ssl, c);
     modssl_set_app_data2(ssl, NULL); /* will be request_rec */
 
-    sslconn->ssl = ssl;
-
     SSL_set_verify_result(ssl, X509_V_OK);
 
     ssl_io_filter_init(c, r, ssl);