1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

177 Commits

Author SHA1 Message Date
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
William A. Rowe Jr
79c5523d2f errno? EINTR? what planet was this code on :-? Normalize the
ssl_io_filter_connect code to follow the filter read and write.
  Notice that it's buck ugly, but we will extract an rc first from
  the input BIO if it was written, and then try the output bio if
  it was APR_SUCCESS, during _connect processing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97422 13f79535-47bb-0310-9956-ffa450edef68
2002-11-06 07:21:47 +00:00
William A. Rowe Jr
dce6e3383f Merge the last of the 'filtering' functions into ssl_engine_io.c, merge
ssl_abort into what was ssl_hook_CloseConnection, clean out a bunch of
  now-static or private headers from mod_ssl.h, and final fix a very small
  but potent segfault if ->pssl is destroyed within our read loop.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97411 13f79535-47bb-0310-9956-ffa450edef68
2002-11-05 20:47:01 +00:00
William A. Rowe Jr
fd0031d09f Actually, the APR_ECONNABORTED (EOS-only brigade) is the direction we
are contemplating for the next release, not the prior behavior
  (which was APR_SUCCESS for c->aborted.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97401 13f79535-47bb-0310-9956-ffa450edef68
2002-11-05 06:38:41 +00:00
William A. Rowe Jr
e615292ccc With a last little bit of help from Justin, this should cause the
appropriate amount of tumolt and turmoil if our client has 'gone away'
  on us, sparing us of further processing (and potential 'renegotiations'
  with a non-existant client.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97400 13f79535-47bb-0310-9956-ffa450edef68
2002-11-05 03:38:14 +00:00
William A. Rowe Jr
d9203ca5bc At least one doc I've seen says EOF+bytes is valid. This was a typo.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97399 13f79535-47bb-0310-9956-ffa450edef68
2002-11-05 03:16:33 +00:00
William A. Rowe Jr
2c5b9e7d66 Appears we forgot to check the possibility of errors coming from the
write brigade passed down from the content generator through the body
  and protocol filters.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97397 13f79535-47bb-0310-9956-ffa450edef68
2002-11-04 19:41:52 +00:00
William A. Rowe Jr
ef70d9e2f7 Rename the many flavors of filter_ctx (pRec, fctx etc) to filter_ctx,
wbio to bio_out, BIO new and free to create and destroy (to match OpenSSL),
  refactor the bio write code to stash errors in outctx->rc,
  fix the blocking read at EOF if we have some data to return,
  and preempt the nonblock read on GETLINE if we have the newline already.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97393 13f79535-47bb-0310-9956-ffa450edef68
2002-11-04 17:39:56 +00:00
Justin Erenkrantz
f87ec93f2e Add some waypoints to understanding this code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97374 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 10:37:06 +00:00
Justin Erenkrantz
24aa081c2d Add some commentary on how we *think* the input filtering should be working
in mod_ssl.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97373 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 10:19:56 +00:00
Justin Erenkrantz
35442600da I don't see how *len > wanted, but leave the check there.
Stick a comment in there as a 'Waldo was here' so that if I ever see this
again, I realize that I've actually thought about it and didn't think >
was necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97372 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 09:42:09 +00:00
William A. Rowe Jr
a75b148a5f Clean up the read pattern for cases when some data already exists.
Also return APR_SUCCESS once we've gathered any decrypted bytes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97371 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 09:29:06 +00:00
William A. Rowe Jr
e2742465a9 Distinguish inctx, outctx, frec [and b ??? looked like bucket to me!!!]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97370 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 08:58:38 +00:00
William A. Rowe Jr
62c675067d More nits spotted by Justin, and catch all the errors except SYSCALL
in the SSL logging section.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97369 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 08:48:35 +00:00
William A. Rowe Jr
6a63226752 Suggestions by Justin, implemention by Will. Rename away all bogisity,
especially eliminating all of 'our' capitalized identifiers that were
  easily confused with library symbols; go with APR_STATUS_IS_EOF() just
  in case there is a platform result; fix a bogus *len = 0; reassignment
  and fold the two flavors of input context tracking into one.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97368 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 08:39:59 +00:00
William A. Rowe Jr
b631a9cc71 Completely refactor the BIO-side client input handling for the SSL library.
Should eliminate many false spurious interrupt detected errors.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97367 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 08:35:19 +00:00
Jim Jagielski
ea1784b444 Ugg. We need to use '%pp' not '%p' since ap_log_error uses apr_vsnprint(),
which has the overloaded '%p' format (not ANSI).

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97252 13f79535-47bb-0310-9956-ffa450edef68
2002-10-17 13:25:08 +00:00
Ryan Bloom
658c2437bd This stuff shouldn't have been committed. This is the SSL upgrade stuff,
and it was included in a commit that shouldn't have touched these files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97201 13f79535-47bb-0310-9956-ffa450edef68
2002-10-14 04:15:58 +00:00
Ryan Bloom
37f9061757 Fix a compile of compiler warnings. I don't know how these slipped past.
Also, uncomment a line of code that the last commit should have uncommented.
Randall found this line and the fix, but I forgot to uncomment this line
along with the fix.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97179 13f79535-47bb-0310-9956-ffa450edef68
2002-10-11 15:29:22 +00:00
Justin Erenkrantz
798c1dae43 Add a filter_init function to the filters so that a filter can execute
arbitrary code before the handlers are invoked.

This resolves an issue with incorrect 304s on If-Modified-Since mod_include
requests since ap_meets_conditions() is not aware that this is a dynamic
request and it is not possible to satisfy 304 for these requests (unless
xbithack full is on, of course).  When mod_include runs as a filter, it is
too late to set any flag since the handler is responsible for calling
ap_meets_conditions(), which it should do before generating any data.

If a module doesn't need to run such arbitrary code, it can just pass NULL
as the argument and all is well.

PR:	9673
Reviewed by:	Ryan Bloom and others


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95906 13f79535-47bb-0310-9956-ffa450edef68
2002-06-28 08:40:25 +00:00
Ryan Bloom
37f858acc6 Remove all special mod_ssl URIs. This also fixes the bug where
redirecting (.*) will allow an SSL protected page to be viewed
without SSL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95501 13f79535-47bb-0310-9956-ffa450edef68
2002-06-04 07:12:26 +00:00