diff options
author | Graham Leggett <minfrin@apache.org> | 2022-01-23 21:16:06 +0000 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2022-01-23 21:16:06 +0000 |
commit | 4666e42cc023a95a432895da8b3106907e274525 (patch) | |
tree | 741c0df198a77d0c03c5f349ed2032d9ca13246b /modules/ssl | |
parent | 225d471b6ea6efe475540348d72b3cb070182bc7 (diff) | |
download | httpd-4666e42cc023a95a432895da8b3106907e274525.tar.gz |
mod_ssl: We no longer throw away handshake errors. Handle APR_EGENERAL
which means that mod_ssl has passed an http error down the stack.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897387 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/ssl')
-rw-r--r-- | modules/ssl/mod_ssl.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c index 1714380df8..276ee55b7b 100644 --- a/modules/ssl/mod_ssl.c +++ b/modules/ssl/mod_ssl.c @@ -723,17 +723,37 @@ static int ssl_hook_process_connection(conn_rec* c) if (rv == APR_SUCCESS) { /* great news, lets continue */ + + ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(10370) + "SSL handshake completed, continuing"); + status = DECLINED; } else if (rv == APR_EAGAIN) { /* we've been asked to come around again, don't block */ - status = OK; + + ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(10371) + "SSL handshake in progress, continuing"); + + status = OK; + } + else if (rv == APR_EGENERAL) { + /* handshake error, but mod_ssl handled it */ + + ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(10372) + "SSL handshake failed, returning error response"); + + status = DECLINED; } else { /* we failed, give up */ cs->state = CONN_STATE_LINGER; + ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, APLOGNO(10373) + "SSL handshake was not completed, " + "closing connection"); + status = OK; } } |