altarch-user / rpms / httpd

Forked from rpms/httpd 2 years ago
Clone

Blame SOURCES/httpd-2.4.6-CVE-2017-3169.patch

749353
diff --git a/modules/ssl/ssl_engine_io.c b/modules/ssl/ssl_engine_io.c
749353
index 85c6ce7..4a9fc9a 100644
749353
--- a/modules/ssl/ssl_engine_io.c
749353
+++ b/modules/ssl/ssl_engine_io.c
749353
@@ -834,19 +834,20 @@ static apr_status_t ssl_filter_write(ap_filter_t *f,
749353
  * establish an outgoing SSL connection. */
749353
 #define MODSSL_ERROR_BAD_GATEWAY (APR_OS_START_USERERR + 1)
749353
 
749353
-static void ssl_io_filter_disable(SSLConnRec *sslconn, ap_filter_t *f)
749353
+static void ssl_io_filter_disable(SSLConnRec *sslconn, 
749353
+                                  bio_filter_in_ctx_t *inctx)
749353
 {
749353
-    bio_filter_in_ctx_t *inctx = f->ctx;
749353
     SSL_free(inctx->ssl);
749353
     sslconn->ssl = NULL;
749353
     inctx->ssl = NULL;
749353
     inctx->filter_ctx->pssl = NULL;
749353
 }
749353
 
749353
-static apr_status_t ssl_io_filter_error(ap_filter_t *f,
749353
+static apr_status_t ssl_io_filter_error(bio_filter_in_ctx_t *inctx,
749353
                                         apr_bucket_brigade *bb,
749353
                                         apr_status_t status)
749353
 {
749353
+    ap_filter_t *f = inctx->f;
749353
     SSLConnRec *sslconn = myConnConfig(f->c);
749353
     apr_bucket *bucket;
749353
     int send_eos = 1;
749353
@@ -860,7 +861,7 @@ static apr_status_t ssl_io_filter_error(ap_filter_t *f,
749353
             ssl_log_ssl_error(SSLLOG_MARK, APLOG_INFO, sslconn->server);
749353
 
749353
             sslconn->non_ssl_request = NON_SSL_SEND_HDR_SEP;
749353
-            ssl_io_filter_disable(sslconn, f);
749353
+            ssl_io_filter_disable(sslconn, inctx);
749353
 
749353
             /* fake the request line */
749353
             bucket = HTTP_ON_HTTPS_PORT_BUCKET(f->c->bucket_alloc);
749353
@@ -1342,7 +1343,7 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
749353
      * rather than have SSLEngine On configured.
749353
      */
749353
     if ((status = ssl_io_filter_handshake(inctx->filter_ctx)) != APR_SUCCESS) {
749353
-        return ssl_io_filter_error(f, bb, status);
749353
+        return ssl_io_filter_error(inctx, bb, status);
749353
     }
749353
 
749353
     if (is_init) {
749353
@@ -1396,7 +1397,7 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
749353
 
749353
     /* Handle custom errors. */
749353
     if (status != APR_SUCCESS) {
749353
-        return ssl_io_filter_error(f, bb, status);
749353
+        return ssl_io_filter_error(inctx, bb, status);
749353
     }
749353
 
749353
     /* Create a transient bucket out of the decrypted data. */
749353
@@ -1613,7 +1614,7 @@ static apr_status_t ssl_io_filter_output(ap_filter_t *f,
749353
     inctx->block = APR_BLOCK_READ;
749353
 
749353
     if ((status = ssl_io_filter_handshake(filter_ctx)) != APR_SUCCESS) {
749353
-        return ssl_io_filter_error(f, bb, status);
749353
+        return ssl_io_filter_error(inctx, bb, status);
749353
     }
749353
 
749353
     while (!APR_BRIGADE_EMPTY(bb)) {