1
0
mirror of https://github.com/apache/httpd.git synced 2025-06-04 21:42:15 +03:00

147 Commits

Author SHA1 Message Date
Paul Querna
dc08a1050d Fixup style nitpicks:
- Empty lines should not have spaces
 - Declare static functions in http_core.c at the top.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@546632 13f79535-47bb-0310-9956-ffa450edef68
2007-06-12 20:55:57 +00:00
Paul Querna
83a3e2a77f Add a clogging_input_filters variable to the conn_rec, enabling the Event MPM to know when its running with an input filter that buffers its own data, like mod_ssl.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@546328 13f79535-47bb-0310-9956-ffa450edef68
2007-06-12 00:32:24 +00:00
Joe Orton
bc522e757b * modules/ssl/ssl_engine_io.c (ssl_io_buffer_fill): Remove subpool; it
cannot be destroyed before r->pool so serves no purpose.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@478141 13f79535-47bb-0310-9956-ffa450edef68
2006-11-22 12:11:57 +00:00
Roy T. Fielding
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
William A. Rowe Jr
7e18e19091 New SSLLogLevelDebugDump [ None (default) | IO (not bytes) | Bytes ]
configures the I/O Dump of SSL traffic, when LogLevel is set to Debug.
  The default is none as this is far greater debugging resolution than 
  the typical administrator is prepared to untangle.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@416265 13f79535-47bb-0310-9956-ffa450edef68
2006-06-22 06:13:07 +00:00
Colm MacCarthaigh
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
Martin Kraemer
1d42526e3e Fix SSL Protocol hexdumps for EBCDIC systems
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@349906 13f79535-47bb-0310-9956-ffa450edef68
2005-11-30 08:01:35 +00:00
Jim Jagielski
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
Jim Jagielski
5d2fae4818 No functional change: simple detabbing of indented code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332305 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:05:51 +00:00
Joe Orton
23a3c20db2 Implement a (bounded) buffer of request body data to provide a limited
but safe fix for the mod_ssl renegotiation-vs-requests-with-bodies
bug:

* modules/ssl/ssl_private.h (ssl_io_buffer_fill): Add prototype.

* modules/ssl/ssl_engine_io.c (ssl_io_buffer_fill,
ssl_io_filter_buffer): New functions.

* modules/ssl/ssl_engine_kernel.c (ssl_hook_Access): If a
renegotiation is needed, and the request has a non-zero
content-length, or a t-e header (and 100-continue was not requested),
call ssl_io_buffer_fill to set aside the request body data if
possible, then proceed with the negotiation.

PR: 12355


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@290965 13f79535-47bb-0310-9956-ffa450edef68
2005-09-22 15:38:14 +00:00
Joe Orton
d2ed0fd309 * modules/ssl/ssl_engine_io.c (ssl_io_filter_init): Initialize the
nobuffer flag to zero since the structure is palloc'ed not pcalloc'ed.

PR: 35279


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@189971 13f79535-47bb-0310-9956-ffa450edef68
2005-06-10 15:13:59 +00:00
Justin Erenkrantz
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
Joe Orton
b1391e12be * modules/ssl/ssl_engine_io.c (bio_filter_out_flush): Fail if the
connection was reset.

PR: 32699


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@125166 13f79535-47bb-0310-9956-ffa450edef68
2005-01-14 14:16:58 +00:00
Joe Orton
c1f1265c2b * modules/ssl/ssl_engine_io.c (bio_filter_out_flush): Revert the
passed-brigade-reuse "fix" which is currently unnecessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111962 13f79535-47bb-0310-9956-ffa450edef68
2004-12-15 11:17:22 +00:00
Joe Orton
d0127de8e8 * modules/ssl/ssl_engine_io.c (ssl_io_filter_cleanup): Fix segfaults
from using ap_log_cerror from a c->pool cleanup; the debug message
triggers too often anyway so just remove it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111959 13f79535-47bb-0310-9956-ffa450edef68
2004-12-15 10:08:09 +00:00
Joe Orton
16bfea9b63 * modules/ssl/ssl_engine_io.c (ssl_io_filter_Upgrade): Simplify the
Upgrade header check; allow upgrades on any method; don't drop the
ap_pass_brigade return value.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111159 13f79535-47bb-0310-9956-ffa450edef68
2004-12-07 22:49:54 +00:00
Joe Orton
db21c0932f * modules/ssl/ssl_engine_io.c (ssl_io_filter_Upgrade): Remove the
unnecessary check of the Connection request header.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109499 13f79535-47bb-0310-9956-ffa450edef68
2004-12-02 13:34:48 +00:00
Paul Querna
ab67a07bb0 Use a case insensitive compare when looking for 'Upgrade'.
The first client I tested was sending 'upgrade'.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109447 13f79535-47bb-0310-9956-ffa450edef68
2004-12-02 04:25:52 +00:00
Joe Orton
0369bbbc93 Fix handling of non-blocking reads in mod_ssl (triggered by recent
change to mod_proxy_http):

* modules/ssl/ssl_engine_io.c (bio_filter_in_read): Return an error if
the read would block so that the SSL_read() caller checks for
SSL_ERROR_WANT_READ, rather than 0, which is treated like EOF.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105768 13f79535-47bb-0310-9956-ffa450edef68
2004-11-14 17:20:01 +00:00
Joe Orton
413c2f1a13 * modules/ssl/ssl_engine_io.c, modules/ssl/ssl_engine_kernel.c,
modules/mod_ssl.c: Switch to using ap_log_cerror() in place of
ap_log_error() everywhere that the conn_rec * is available.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105739 13f79535-47bb-0310-9956-ffa450edef68
2004-11-10 13:35:28 +00:00
Joe Orton
4d1d856e9d * modules/ssl/ssl_engine_io.c (ssl_io_filter_connect): Return
502 not 501 if SSL_connect() fails for a proxy connection.

PR: 31083


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105252 13f79535-47bb-0310-9956-ffa450edef68
2004-09-22 16:34:20 +00:00
Joe Orton
63b4ad0dcb * modules/ssl/ssl_engine_io.c (ssl_io_input_read): Fix rollback
handling for AP_MODE_SPECULATIVE.

PR: 30134


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104687 13f79535-47bb-0310-9956-ffa450edef68
2004-08-17 16:31:23 +00:00
Joe Orton
371ef0b07e * modules/ssl/ssl_engine_io.c (ssl_io_input_read): Fix potential
infinite loop in ssl_io_input_getline if connection is aborted without
inctx->rc being set.

PR: 29964


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104547 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 13:19:24 +00:00
Bradley Nicholes
8994a47b7a Tokenize the header while parsing it for the upgrade tokens and once the protocol has been upgraded, allow the request to complete encrypted.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104273 13f79535-47bb-0310-9956-ffa450edef68
2004-07-13 18:11:22 +00:00
Joe Orton
56230926c0 * modules/ssl/ssl_engine_io.c (bio_filter_out_flush): Create a new
brigade for sending output after passing on the current one.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103967 13f79535-47bb-0310-9956-ffa450edef68
2004-06-15 21:00:22 +00:00
Joe Orton
fea85e203c * modules/ssl/ssl_engine_io.c (ssl_io_filter_cleanup): Don't try and
send an SSL shutdown from a pool cleanup.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103156 13f79535-47bb-0310-9956-ffa450edef68
2004-03-25 19:36:32 +00:00
Joe Orton
e878bf757b * modules/ssl/ssl_engine_io.c (ssl_io_filter_disable,
ssl_io_filter_error): Clear the SSL * pointer in the SSLConnRec too.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102819 13f79535-47bb-0310-9956-ffa450edef68
2004-02-29 00:29:20 +00:00
Joe Orton
3ca3524c31 Move mod_ssl-internal interfaces into ssl_private.h; allow mod_ssl.h
to be included even when mod_ssl is not enabled.

* Makefile.in (install-include): Only install mod_ssl.h.

* modules/ssl/ssl_private.h: New file.

* modules/ssl/mod_ssl.h: Move everything apart from than the optional
hook definitions into ssl_private.h.

* modules/ssl/*.c: Include ssl_private.h not mod_ssl.h

* modules/ssl/config.m4: Always add the mod_ssl directory to the
include path so other modules can find mod_ssl.h.

* modules/proxy/mod_proxy.c: Include mod_ssl.h to pick up the optional
hook definitions rather than copy'n'pasting them.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102803 13f79535-47bb-0310-9956-ffa450edef68
2004-02-28 18:06:35 +00:00
Madhusudan Mathihalli
48c38a4533 Send the 'Close Alert' message to the peer upon closing a SSL session. This
required creating a new EOC (End-Of-Connection) bucket type to notify mod_ssl
that the connection is about to be closed.


Reviewed by: Joe Orton, Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102793 13f79535-47bb-0310-9956-ffa450edef68
2004-02-28 00:45:26 +00:00
Joe Orton
0e34b8f5f4 * modules/ssl/ssl_engine_io.c (ssl_io_filter_disable): Don't leak an
SSL structure for each plain-HTTP-on-SSL-port request.

PR: 27106


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102770 13f79535-47bb-0310-9956-ffa450edef68
2004-02-25 10:54:29 +00:00
André Malo
a688f06b19 fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102618 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:31:03 +00:00
André Malo
0b6155c539 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102573 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 12:52:25 +00:00
André Malo
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
Joe Orton
812f43e569 * modules/ssl/ssl_engine_io.c (ssl_io_filter_output): Use non-blocking
bucket reads whilst data remains available; flush when a read returns
EAGAIN.  Fixes streaming nph- CGI scripts over SSL.

PR: 21944
Inspired by: Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102397 13f79535-47bb-0310-9956-ffa450edef68
2004-01-23 16:50:24 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Joe Orton
4de16bd525 Fix format string warnings from gcc on amd64:
* modules/ssl/ssl_scache_dbm.c (ssl_scache_dbm_store):
Print apr_size_t using APR_SIZE_T_FMT.

* modules/ssl/ssl_engine_io.c (ssl_filter_write): Print difference
between sizes using APR_SSIZE_T_FMT, apr_size_t using APR_SIZE_T_FMT.

* modules/proxy/proxy_http.c (ap_proxy_http_request): Print
apr_uint64_t using APR_UINT64_T_HEX_FMT.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102037 13f79535-47bb-0310-9956-ffa450edef68
2003-12-12 12:36:50 +00:00
Joe Orton
c198e9b265 * ssl_engine_io.c (ssl_io_filter_connect): Check the
library code as well as the reason code when looking for the
plain-HTTP-request error.

Submitted by: Stephen Henson <steve@openssl.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101135 13f79535-47bb-0310-9956-ffa450edef68
2003-08-29 14:45:26 +00:00
Joe Orton
eb49ea1f5c Prevent segfaults after SSL renegotiation failures.
* modules/ssl/ssl_engine_kernel.c (ssl_hook_Access): Set aborted flag
after renegotiation failure.

* modules/ssl/ssl_engine_io.c (ssl_filter_write, ssl_io_filter_output):
Don't dereference BIOs in filter_ctx when filter_ctx->pssl is NULL.
(ssl_filter_io_shutdown): Set aborted flag on abortive shutdown.

PR: 21370
Submitted by: Hartmut Keil <Hartmut.Keil@adnovum.ch>
Cleaned up by: Jeff Trawick, Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100720 13f79535-47bb-0310-9956-ffa450edef68
2003-07-21 12:02:40 +00:00
William A. Rowe Jr
26f1ba8050 The patch below reverts the prior commit to eliminate SSL_set_state().
Some additional work or research is required in order to pass the
  perl-framework regressions, but I don't have the cycles and don't
  care to leave the broken code in cvs HEAD.

REVERTING: wrowe 2003/05/19 08:13:19

  Modified:    modules/ssl config.m4 ssl_engine_io.c ssl_engine_kernel.c
                        ssl_toolkit_compat.h
  Log:
    Drop SSL_set_state() in favor of a proper SSL_renegotiate() to begin
    rehandshaking the SSL connection, vis-a-vis ApacheSSL.

  Revision  Changes    Path
  1.15      +0 -1      httpd-2.0/modules/ssl/config.m4
  1.108     +1 -1      httpd-2.0/modules/ssl/ssl_engine_io.c
  1.93      +1 -1      httpd-2.0/modules/ssl/ssl_engine_kernel.c
  1.34      +0 -6      httpd-2.0/modules/ssl/ssl_toolkit_compat.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100004 13f79535-47bb-0310-9956-ffa450edef68
2003-05-22 19:41:32 +00:00
William A. Rowe Jr
1a6f1ae739 Drop SSL_set_state() in favor of a proper SSL_renegotiate() to begin
rehandshaking the SSL connection, vis-a-vis ApacheSSL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99921 13f79535-47bb-0310-9956-ffa450edef68
2003-05-19 15:13:19 +00:00
Justin Erenkrantz
9ba66751f2 Get the AP_ and APR_ prefixes right.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99879 13f79535-47bb-0310-9956-ffa450edef68
2003-05-16 21:16:35 +00:00
William A. Rowe Jr
f066f6c662 Assure that we block on the read BIO when we invoke the read BIO for both
first-use cases (via ssl_io_input_add_filter) and when we are writing and
  need response from the client (via ssl_io_filter_output).  Both of these
  cases are always blocking.  [

PR: 19242
Submitted by:	David Deaves <David.Deaves@dd.id.au>, William Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99863 13f79535-47bb-0310-9956-ffa450edef68
2003-05-16 16:11:03 +00:00
William A. Rowe Jr
067c217ce4 Reapply the fix *intended* by rev 1.79 in a safer manner. Prior to
all assignments and the final SSL_free(), free ssl_conn->client_cert
  to avoid leaks of this refcounted X509*.  Prereleasing refcounted
  objects is unsafe programming; fix applied to both branches.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99252 13f79535-47bb-0310-9956-ffa450edef68
2003-04-05 19:04:44 +00:00
Madhusudan Mathihalli
88ac014cc0 Fix a 64-bit porting issue.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98747 13f79535-47bb-0310-9956-ffa450edef68
2003-02-21 20:12:24 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
William A. Rowe Jr
2f62c790c7 After some productive feedback and no negative feedback, introduce
SSLEngine upgrade so that we can begin and continue to support these
  facilities.  This makes it simpler to keep this effort (while we have
  no known clients that support Connection: upgrade at this time), and
  begin refactoring more of SSL into smaller and tighter (and then optional)
  components.

  Submitted by: Ryan Bloom
  Reviewed by: William Rowe, Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97912 13f79535-47bb-0310-9956-ffa450edef68
2002-12-14 07:46:45 +00:00
Cliff Woolley
3105040e0e Fix some possibly-uninitialized variables.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97617 13f79535-47bb-0310-9956-ffa450edef68
2002-11-23 21:19:03 +00:00
William A. Rowe Jr
7ce4ae5b51 Turn DOWN the volume of these errors... they are low enough level notes
to land at loglevel INFO


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97439 13f79535-47bb-0310-9956-ffa450edef68
2002-11-07 06:26:48 +00:00
William A. Rowe Jr
875f5df575 Per Justin's feedback, this still needed a little work to get the
four cases (block/nonblock read/nodata) straight.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97424 13f79535-47bb-0310-9956-ffa450edef68
2002-11-06 07:44:11 +00:00
William A. Rowe Jr
0e489c76d2 Rule one of winsock and other one-offs (even unix EINTR) ... blocking
isn't necessarily blocking.  Should not have changed this in the prior
  commit, and adding the same retry to the -1/EAGAIN|EINTR case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97423 13f79535-47bb-0310-9956-ffa450edef68
2002-11-06 07:29:36 +00:00