You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2017/05/26 21:09:32 UTC
svn commit: r1796343 - in /httpd/httpd/trunk: CHANGES
modules/ssl/ssl_engine_io.c
Author: covener
Date: Fri May 26 21:09:32 2017
New Revision: 1796343
URL: http://svn.apache.org/viewvc?rev=1796343&view=rev
Log:
mod_ssl: fix ctx passed to ssl_io_filter_error()
Consistently pass the expected bio_filter_in_ctx_t
to ssl_io_filter_error().
Submitted By: Yann Ylavic
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/ssl/ssl_engine_io.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1796343&r1=1796342&r2=1796343&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Fri May 26 21:09:32 2017
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_ssl: Consistently pass the expected bio_filter_in_ctx_t
+ to ssl_io_filter_error(). [Yann Ylavic]
+
*) mod_env: when processing a 'SetEnv' directive, warn if the environment
variable name includes a '='. It is likely a configuration error.
PR 60249 [Christophe Jaillet]
Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_io.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_io.c?rev=1796343&r1=1796342&r2=1796343&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_io.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_io.c Fri May 26 21:09:32 2017
@@ -967,20 +967,21 @@ static apr_status_t ssl_filter_write(ap_
* establish an outgoing SSL connection. */
#define MODSSL_ERROR_BAD_GATEWAY (APR_OS_START_USERERR + 1)
-static void ssl_io_filter_disable(SSLConnRec *sslconn, ap_filter_t *f)
+static void ssl_io_filter_disable(SSLConnRec *sslconn,
+ bio_filter_in_ctx_t *inctx)
{
- bio_filter_in_ctx_t *inctx = f->ctx;
SSL_free(inctx->ssl);
sslconn->ssl = NULL;
inctx->ssl = NULL;
inctx->filter_ctx->pssl = NULL;
}
-static apr_status_t ssl_io_filter_error(ap_filter_t *f,
+static apr_status_t ssl_io_filter_error(bio_filter_in_ctx_t *inctx,
apr_bucket_brigade *bb,
apr_status_t status,
int is_init)
{
+ ap_filter_t *f = inctx->f;
SSLConnRec *sslconn = myConnConfig(f->c);
apr_bucket *bucket;
int send_eos = 1;
@@ -993,7 +994,7 @@ static apr_status_t ssl_io_filter_error(
"trying to send HTML error page");
ssl_log_ssl_error(SSLLOG_MARK, APLOG_INFO, sslconn->server);
- ssl_io_filter_disable(sslconn, f);
+ ssl_io_filter_disable(sslconn, inctx);
f->c->keepalive = AP_CONN_CLOSE;
if (is_init) {
sslconn->non_ssl_request = NON_SSL_SEND_REQLINE;
@@ -1553,7 +1554,7 @@ static apr_status_t ssl_io_filter_input(
* rather than have SSLEngine On configured.
*/
if ((status = ssl_io_filter_handshake(inctx->filter_ctx)) != APR_SUCCESS) {
- return ssl_io_filter_error(f, bb, status, is_init);
+ return ssl_io_filter_error(inctx, bb, status, is_init);
}
if (is_init) {
@@ -1607,7 +1608,7 @@ static apr_status_t ssl_io_filter_input(
/* Handle custom errors. */
if (status != APR_SUCCESS) {
- return ssl_io_filter_error(f, bb, status, 0);
+ return ssl_io_filter_error(inctx, bb, status, 0);
}
/* Create a transient bucket out of the decrypted data. */
@@ -1796,7 +1797,7 @@ static apr_status_t ssl_io_filter_output
inctx->block = APR_BLOCK_READ;
if ((status = ssl_io_filter_handshake(filter_ctx)) != APR_SUCCESS) {
- return ssl_io_filter_error(f, bb, status, 0);
+ return ssl_io_filter_error(inctx, bb, status, 0);
}
while (!APR_BRIGADE_EMPTY(bb) && status == APR_SUCCESS) {