1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-04 05:42:12 +03:00

296 Commits

Author SHA1 Message Date
Doug MacEachern
d6497301dc moving chunk of logic that deals with writing ssl data from
ssl_io_filter_Output() to a new ssl_filter_write() function.
this will make it easier to optimize how we deal with file buckets
than cannot be mmaped.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92209 13f79535-47bb-0310-9956-ffa450edef68
2001-11-28 03:15:41 +00:00
Doug MacEachern
83c0b89f0a implement a custom BIO which allows us to hook SSL_write directly into
an apr_bucket_brigade and use transient buckets with the SSL
malloc-ed buffer, rather than copying into a mem BIO.

also allows us to pass the brigade as data is being written
rather than buffering up the entire response in the mem BIO.

PR:
Obtained from:
Submitted by:
Reviewed by:	Justin Erenkrantz, Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92206 13f79535-47bb-0310-9956-ffa450edef68
2001-11-27 23:37:20 +00:00
Doug MacEachern
b03492249b add input filter AP_MODE_INIT support to handshake before reading
request data from the client.
PR:
Obtained from:
Submitted by:	dougm
Reviewed by:	wrowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92043 13f79535-47bb-0310-9956-ffa450edef68
2001-11-19 22:37:57 +00:00
Ryan Bloom
c443151064 Fix the SSL filter logic. The SSL filter is not a network filter, because
it does not actually do the reading and writing to the network.  By
moving that filter to in between CONNECTION and NETWORK filters, we ensure
that SSL is always called before the core.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91969 13f79535-47bb-0310-9956-ffa450edef68
2001-11-15 20:55:13 +00:00
William A. Rowe Jr
b9e48fc75e Fix a nasty GP fault... stop testing buckets after they are passed!!!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91610 13f79535-47bb-0310-9956-ffa450edef68
2001-10-20 20:43:37 +00:00
Justin Erenkrantz
f002d4e8fd Well, now I know what the bio_is_renegotiating call was for.
Place a big-ass comment there so that whomever comes next isn't stuck
at a cryptic call that they don't understand with a dinky comment.
Hopefully, this makes sense.  Someone more familiar with OpenSSL should
verify the comment.

This fix also requires the normalize call to be performed before
churn_input so that we don't enter churn_input with a 0-length ctx->b
brigade.

All httpd-test tests (except for the module/negotiation test) pass now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91442 13f79535-47bb-0310-9956-ffa450edef68
2001-10-12 06:27:04 +00:00
Justin Erenkrantz
4714a72ae4 If we passed the bucket to ap_pass_brigade (because it was EOS or FLUSH),
we shouldn't delete it.

Thanks to Doug for pointing out that something broke.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91441 13f79535-47bb-0310-9956-ffa450edef68
2001-10-12 04:59:19 +00:00
Justin Erenkrantz
fd1950344a Lose the magic number and use the central #define AP_IOBUFSIZE.
Hey, I've never seen it in actual use anywhere, so I didn't know.

Thanks to Roy for pointing it out.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91440 13f79535-47bb-0310-9956-ffa450edef68
2001-10-12 02:00:41 +00:00
Justin Erenkrantz
e3d203298e This is the mod_ssl input filtering rewrite. Lots of stuff here. I also
changed some of the style issues within the filtering code to conform to
the rest of the server.

Various incarnations of this patch have been posted to dev@httpd without
feedback.  Now that it passes all of the httpd-test cases (with the
exception of module/negotiation test which fails without mod_ssl anyway),
it is time to check it in.

Please review and test.  We are under C-T-R rules, so I'm going to take
advantage of that and commit it now.  I have tested this about as much
as I can and it seems to work from everything I can give to it.
Considering that mod_ssl was broken before this commit, this is an
improvement.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91414 13f79535-47bb-0310-9956-ffa450edef68
2001-10-11 01:49:21 +00:00
Justin Erenkrantz
d18a2bcce3 Ah, I didn't see that churn is only used on input - rename the function
to match churn_output.  =)

Yes, I'm slowly working on fixing mod_ssl...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91289 13f79535-47bb-0310-9956-ffa450edef68
2001-10-04 17:50:39 +00:00
William A. Rowe Jr
92c68926f4 BIO_write returns an int. Whacha gonna do? Kill the last non-ab warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91220 13f79535-47bb-0310-9956-ffa450edef68
2001-10-01 16:07:17 +00:00
Ryan Bloom
bfe91354fb Allow mod_ssl to send back an error message if an HTTP request is sent
over an HTTPS connection.  This also adds an ap_remove_input_filter
function, which should be used to remove the SSL input filter in this
case, as soon as this code is stressed a bit more.

For right now, we are sending the same message that we used to send in
mod_ssl for Apache 1.3.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90724 13f79535-47bb-0310-9956-ffa450edef68
2001-08-27 06:00:51 +00:00
Doug MacEachern
99bc864e36 enable i/o debugging
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90645 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 18:06:47 +00:00
Doug MacEachern
e3f378e265 churn_output should return the value of ap_pass_brigade
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90640 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 17:17:35 +00:00
Cliff Woolley
051e111a79 performance: change an O(n) while loop to an equivalent O(1) brigade macro
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90536 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 02:32:26 +00:00
Cliff Woolley
b5bfeab91b Another step in improving legibility by factoring out some redundant code
(how many times can you test the same condition in one function? :-)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90535 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 02:23:43 +00:00
Cliff Woolley
0797ef8079 Nit: the lack of brackets was driving me crazy
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90531 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 00:23:54 +00:00
Cliff Woolley
10638bebb4 Simplify the apr_read_type_e vs. ap_input_mode_t silliness. The two
are compatible (due to our early abort when PEEK mode is requested),
so we don't have to go to so much effort to convert from one to the other.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90530 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 00:21:40 +00:00
Cliff Woolley
6178a2c69e There's only one way for bb to be non-NULL, so these two
cases can be combined.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90513 13f79535-47bb-0310-9956-ffa450edef68
2001-08-22 22:25:14 +00:00
Doug MacEachern
d001e33664 rather than creating small 1024 byte buckets of output data,
create a transient bucket pointing directly to the BIO mem buff.
this makes for a dramatic increase in performance. previously,
downloading large files (2Mb-5Mb-ish) made my laptop start to
smoke from the fan spinning so fast to cool the cpu.
also, apache stylize churn_output()
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90497 13f79535-47bb-0310-9956-ffa450edef68
2001-08-22 16:59:26 +00:00
Doug MacEachern
8354775eec destroy the brigade when we are done with it, rather than remove
one bucket at a time.  prevents a problem when downloading large files.
also change ssl_io_filter_Output to apache style
and change some variable names that should make the code easier to
read/understand, e.g. pbbIn -> bb, pbktIn -> bucket
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90490 13f79535-47bb-0310-9956-ffa450edef68
2001-08-22 15:30:37 +00:00
Doug MacEachern
8eba9b3bac cut out some noise
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90451 13f79535-47bb-0310-9956-ffa450edef68
2001-08-21 00:58:42 +00:00
Doug MacEachern
242a4afd67 get rid of asserts
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90450 13f79535-47bb-0310-9956-ffa450edef68
2001-08-21 00:53:54 +00:00
Doug MacEachern
9d806f444e remove unused #if 0-ed code when reading from the write bio
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90445 13f79535-47bb-0310-9956-ffa450edef68
2001-08-20 23:53:50 +00:00
Doug MacEachern
6c69c6421a remove unused ssl_io_ functions
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90444 13f79535-47bb-0310-9956-ffa450edef68
2001-08-20 23:48:16 +00:00
Jeff Trawick
901dab0572 check for timeout on socket read when we check for ECONNRESET and eof
previously, we'd die on an assert() (really nasty for threaded MPM) when
we hit a keepalive timeout for a browser like netscape which keeps the
connection open


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90244 13f79535-47bb-0310-9956-ffa450edef68
2001-08-16 21:11:30 +00:00
Jeff Trawick
7f6f1a2cdc fix a few mod_ssl warnings for stuff like function which were neither
static nor prototyped, char * vs. const char *, etc.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90238 13f79535-47bb-0310-9956-ffa450edef68
2001-08-16 19:56:47 +00:00
Doug MacEachern
5eb7150217 if ssl shutdown happens earlier than expected, filter code needs be aware
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90227 13f79535-47bb-0310-9956-ffa450edef68
2001-08-16 17:01:53 +00:00
Doug MacEachern
c64021d473 need to remove buckets from the output brigade, since we will be passing a different brigade
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90225 13f79535-47bb-0310-9956-ffa450edef68
2001-08-16 16:46:30 +00:00
Doug MacEachern
d79cea3d70 enable ssl Translate, UserCheck, Access and Auth hooks
add support for renegotiation during the Access hook
this requires hooking into the read and write SSL BIOs in order to
flush data to the client and read from the filter chain

this also requires that the ssl filters become "aware" that
renegotitation is in progress so that the BIOs are left alone for
SSL_renegotiate/SSL_do_handshake in ssl_hook_Access to deal with

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90185 13f79535-47bb-0310-9956-ffa450edef68
2001-08-16 03:58:16 +00:00
Doug MacEachern
d9ed774c22 need to check return value of ssl_hook_process_connection
if != APR_SUCCESS the ssl connection has been shutdown
(for example client cert was revoked)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90155 13f79535-47bb-0310-9956-ffa450edef68
2001-08-14 17:03:03 +00:00
Doug MacEachern
c7ca725678 from madhu: no longer need to force eReadType and eMode
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90030 13f79535-47bb-0310-9956-ffa450edef68
2001-08-08 15:49:07 +00:00
Doug MacEachern
9e5f6279e8 get POST requests working with mod_ssl
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90027 13f79535-47bb-0310-9956-ffa450edef68
2001-08-08 05:11:33 +00:00
Doug MacEachern
558a1a9ca7 drop a brace inside #if 0 so emacs can indent properly
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90023 13f79535-47bb-0310-9956-ffa450edef68
2001-08-08 02:10:51 +00:00
Doug MacEachern
91b1d660d8 s/apr_size_t/apr_off_t/ for input filter
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90022 13f79535-47bb-0310-9956-ffa450edef68
2001-08-08 02:09:26 +00:00
William A. Rowe Jr
fe6a92cae1 Clean up some emits
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89832 13f79535-47bb-0310-9956-ffa450edef68
2001-07-31 16:41:13 +00:00
William A. Rowe Jr
333d6f49ab - eliminated the use of ssl_log - it used to cause seg faults during cleanup
since the conn_rec will no longer be valid.
- eliminated the "for (;;)" processing loop in ssl_io_filter_Output() -
we'll have to do that in churn_output() if required, so that any remaining
OpenSSL data (if available) is transferred before we call the
CloseConnection.
- Any remaining data in SSL should be cleaned up ideally in the
APR_BUCKET_IS_EOS() processing stage itself, as we close the SSL connection
here.


Submitted by:	Madhusudan Mathihalli <madhusudan_mathihalli@hp.com>
Reviewed by:	William Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89816 13f79535-47bb-0310-9956-ffa450edef68
2001-07-31 03:04:55 +00:00
Doug MacEachern
8d045a3727 bandaid for segv in ssl_io_filter_Output
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89681 13f79535-47bb-0310-9956-ffa450edef68
2001-07-24 19:00:12 +00:00
Ralf S. Engelschall
ca8f54367f Apply mod_ssl MEGA porting patch. This is a cleaned up version of the
latest patches from Madhusudan which makes mod_ssl 95% working inside
Apache 2.0. There is still a lot of more work (both porting and cleanup)
to do be done. See modules/ssl/README for details.

Submitted by: Madhusudan Mathihalli <madhusudan_mathihalli@hp.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89618 13f79535-47bb-0310-9956-ffa450edef68
2001-07-19 16:08:01 +00:00
Ralf S. Engelschall
a0f48e90fa Change mostly all old module structure hooks and EAPI hooks to
ap_hook_xxx equivalents. More work has to be done here to clean all this
up and reduce to a minimum...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89020 13f79535-47bb-0310-9956-ffa450edef68
2001-05-05 16:55:28 +00:00
Ralf S. Engelschall
11b82d3226 Axe writev(2) support from the SSL I/O layer because in Apache 2.0 we no
longer handle the bottom line of I/O ourself. Additionally this again
simplifies mod_ssl's I/O part for later transition to mod_tls's approach
with buckets.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89019 13f79535-47bb-0310-9956-ffa450edef68
2001-05-05 16:47:32 +00:00
Ralf S. Engelschall
4f6be425be Axe most WIN32 stuff from Apache 1.3. In Apache 2.0 we either use APR
later for this or we don't do it at all. But we certainly no longer want
to see any platform specific things inside a module.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89018 13f79535-47bb-0310-9956-ffa450edef68
2001-05-05 16:35:18 +00:00
Ralf S. Engelschall
d3cf43347b Axe out SSL_CONSERVATIVE stuff which for Apache 1.3 did I/O data
pre-sucking on POST requests and I/O re-injection in case of SSL
renegotiations. This all either cannot be solved any longer or at least
has to be implemented totally different through I/O layering/filtering.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89017 13f79535-47bb-0310-9956-ffa450edef68
2001-05-05 16:23:00 +00:00
Ralf S. Engelschall
f176ba44b1 Next step in mod_ssl integration:
Add missing files to build environment.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89006 13f79535-47bb-0310-9956-ffa450edef68
2001-05-05 10:12:08 +00:00
Ralf S. Engelschall
c9606e809a mod_ssl integration step 2:
transfer copyright of all code to ASF by using Apache Software License v1.1


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88995 13f79535-47bb-0310-9956-ffa450edef68
2001-05-04 22:21:17 +00:00
Ralf S. Engelschall
f83672781d Initial revision
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88988 13f79535-47bb-0310-9956-ffa450edef68
2001-05-04 21:54:25 +00:00