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
d0365b7f28 mod_ssl: follow up to r1729208: add missing APLOGNO()s.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1732955 13f79535-47bb-0310-9956-ffa450edef68
2016-02-29 21:57:07 +00:00
dc83621bcd apr_strtok minor invocation change to maybe what everyone is used to
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729782 13f79535-47bb-0310-9956-ffa450edef68
2016-02-11 09:18:25 +00:00
9aa81e10a6 * Fix compiler warning of unused variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729700 13f79535-47bb-0310-9956-ffa450edef68
2016-02-10 19:35:34 +00:00
a5511fe280 let proxy handler forward ALPN protocol strings for ssl proxy connections
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729208 13f79535-47bb-0310-9956-ffa450edef68
2016-02-08 16:50:07 +00:00
69ad717ab5 Fix some duplicate definitions
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726888 13f79535-47bb-0310-9956-ffa450edef68
2016-01-26 20:30:28 +00:00
f0c57edf1c handling TIMEUP on SSL inputs by allowing later retries
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725940 13f79535-47bb-0310-9956-ffa450edef68
2016-01-21 13:14:07 +00:00
af14d158a3 Added many log numbers to log statements that
had none.

Those were not detected by the coccinelle script.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725485 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 12:02:41 +00:00
2b3237cd3b mod_ssl: follow up to r1723122, r1723143.
s/endb/upto/ in ssl_io_filter_coalesce() and update CHANGES to
include r1723143.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1723284 13f79535-47bb-0310-9956-ffa450edef68
2016-01-06 11:36:01 +00:00
315c1ceeed mod_ssl: follow up to r1723122.
Coalesce when (subsequent brigade's) data bucket is not last (likely followed
by FLUSH or EOS) but we have buffered data already.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1723143 13f79535-47bb-0310-9956-ffa450edef68
2016-01-05 18:06:23 +00:00
ae174ccc30 mod_ssl: Avoid one TLS record (application data) fragmentation by including
the last suitable bucket when coalescing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1723122 13f79535-47bb-0310-9956-ffa450edef68
2016-01-05 16:52:29 +00:00
535e5efaf4 mod_ssl: fix build with openssl < 0.9.8m (missing semicolon).
Reported by: Petr Gajdos <pgajdos suse.cz>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1719967 13f79535-47bb-0310-9956-ffa450edef68
2015-12-14 17:25:07 +00:00
b7693e5941 mod_ssl: follow up to r1709602.
Fix "HTTP spoken on HTTPS port" broken by the SSL handshake trigger moved to
process_connection hook (r1709602) along with H2Direct speculative read.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715023 13f79535-47bb-0310-9956-ffa450edef68
2015-11-18 17:15:24 +00:00
ebb34c0b07 mod_ssl: performing protocol switch directly after ALPN selection, mod_http2: connection hook inits network filters to force TLS handshake, reads input only if H2Direct explicitly enabled, changes H2Direct default to off even for cleartext connections
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1708107 13f79535-47bb-0310-9956-ffa450edef68
2015-10-12 13:13:45 +00:00
5a18a6f89f mod_ssl: follow up to r1707230: fix (inverted) logic for SSL_in_connect_init().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1707231 13f79535-47bb-0310-9956-ffa450edef68
2015-10-07 10:42:11 +00:00
dd73e48d20 mod_ssl: follow up to r1705823.
Flush SSL/TLS handshake data when writing (instead of before reading),
and only when necessary (openssl < 0.9.8m or proxy/client side).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1707230 13f79535-47bb-0310-9956-ffa450edef68
2015-10-07 10:38:53 +00:00
a8806f4fb2 mod_ssl: fix comment: alpn_proto_negotiated is now protocol_switch hook.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1707028 13f79535-47bb-0310-9956-ffa450edef68
2015-10-06 12:22:51 +00:00
615f97f933 core: Extend support for asynchronous write completion from the
network filter to any connection or request filter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1706669 13f79535-47bb-0310-9956-ffa450edef68
2015-10-04 10:10:51 +00:00
697c9c3d14 mod_ssl: follow up to r1705823.
We still need to flush in the middle of a SSL/TLS handshake.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1706275 13f79535-47bb-0310-9956-ffa450edef68
2015-10-01 15:43:23 +00:00
d110d628a5 mod_ssl: pass through metadata buckets untouched in ssl_io_filter_output(),
the core output filter needs them.

Proposed by: jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705828 13f79535-47bb-0310-9956-ffa450edef68
2015-09-29 10:04:33 +00:00
314335ef62 mod_ssl: follow up to r1705823.
Oups, every #if needs a #endif...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705826 13f79535-47bb-0310-9956-ffa450edef68
2015-09-29 09:57:09 +00:00
6b54dd43b2 mod_ssl: don't FLUSH output (blocking) on read.
This defeats deferred write (and pipelining), eg. check_pipeline() is not
expecting the pipe to be flushed under it.
So let OpenSSL >= 0.9.8m issue the flush when necessary (earlier versions
are known to not handle all the cases, so we keep flushing with those).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705823 13f79535-47bb-0310-9956-ffa450edef68
2015-09-29 09:42:56 +00:00
4c906045a6 Revert r1705236, better solution to come.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705820 13f79535-47bb-0310-9956-ffa450edef68
2015-09-29 09:17:52 +00:00
696e52fa7e mod_ssl: don't FLUSH first for non blocking reads.
Such readers are prepared to receive empty data anyway (and take appropriate
action), while e.g. check_pipeline() is not expecting the pipe to be flushed
under it.

Reverted by: r1705820
Replaced by: r1705823


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705236 13f79535-47bb-0310-9956-ffa450edef68
2015-09-25 07:27:04 +00:00
9aba39ee0c mod_ssl: forward EOR (only) brigades to the core_output_filter().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705194 13f79535-47bb-0310-9956-ffa450edef68
2015-09-24 23:13:03 +00:00
4c9b3c3b35 Support compilation against libssl built with OPENSSL_NO_SSL3,
and change the compiled-in default for SSL[Proxy]Protocol to "all -SSLv3",
in accordance with RFC 7568. PR 58349, PR 57120.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1703952 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 08:40:56 +00:00
c0d80cc90c adding ap_get_protocol(c) which safeguards against NULL returns, for use instead of direct calling ap_run_protocol_get
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1697855 13f79535-47bb-0310-9956-ffa450edef68
2015-08-26 08:58:45 +00:00
8ddd55a110 fix a warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1696566 13f79535-47bb-0310-9956-ffa450edef68
2015-08-19 11:50:35 +00:00
b9ba839d50 new Protocols directive and core API changes to enable protocol switching on HTTP Upgrade or ALPN, implemented in mod_ssl and mod_h2
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1692486 13f79535-47bb-0310-9956-ffa450edef68
2015-07-24 12:09:44 +00:00
d9a3b78926 s/\<\(\w\+\)\>\s\+\<\1\>/\1/g
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1690137 13f79535-47bb-0310-9956-ffa450edef68
2015-07-09 18:07:50 +00:00
a5d078e9b8 mod_ssl namespacing: SSL_X509_match_name -> modssl_X509_match_name
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677156 13f79535-47bb-0310-9956-ffa450edef68
2015-05-01 14:42:42 +00:00
bb903996bf mod_ssl namespacing: SSL_smart_shutdown -> modssl_smart_shutdown
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677145 13f79535-47bb-0310-9956-ffa450edef68
2015-05-01 14:10:23 +00:00
8063d62287 Formatting and wording improvements for ALPN (no code changes)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1676709 13f79535-47bb-0310-9956-ffa450edef68
2015-04-29 10:27:32 +00:00
6dd2a90084 Remove NPN support and focus on ALPN (RFC 7301)
* modules/ssl/mod_ssl.c, modules/ssl/mod_ssl.h: drop
  modssl_register_npn optional function and related declarations.

* modules/ssl/ssl_engine_init.c (ssl_init_ctx_callbacks):
  no longer set NPN advertisement callback.

* modules/ssl/ssl_engine_io.c (ssl_io_filter_input): remove
  NPN handling.

* modules/ssl/ssl_engine_kernel.c (ssl_callback_AdvertiseNextProtos):
  remove callback.

* modules/ssl/ssl_private.h: remove NPN prototypes, set
  HAVE_TLS_ALPN (OpenSSL 1.0.2 and later) with feature-based detection.

Rename SSLAlpnPreference to SSLALPNPreference, and add documentation.

Previous commits related to NPN and ALPN, for reference purposes:

r1332643 - Add support for TLS Next Protocol Negotiation
r1487772 - mod_ssl: Redesign NPN (Next Protocol Negotiation) API
           to avoid use of hooks API and inter-module hard linkage
r1670397 - ALPN support, based on mod_spdy/mod_h2 patch set
r1670434 - More ALPN goodness

(plus some minor tweaks: r1670578, r1670440, r1670578,
 r1670738, r1675459, and r1675549)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1676004 13f79535-47bb-0310-9956-ffa450edef68
2015-04-25 09:46:09 +00:00
4c43036c9e mod_ssl namespacing: Rename ssl_util_ssl.h macros from SSL_foo to MODSSL_foo.
For related discussion, see the dev@ thread starting at:
http://mail-archives.apache.org/mod_mbox/httpd-dev/201504.mbox/%3C20150415163613.GC15209%40fintan.stsp.name%3E


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1674538 13f79535-47bb-0310-9956-ffa450edef68
2015-04-18 16:43:34 +00:00
31c3573052 Followup to r1670397: add missing APLOGNO.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1670432 13f79535-47bb-0310-9956-ffa450edef68
2015-03-31 19:09:12 +00:00
17565ac48c ALPN support, based on mod_spdy/mod_h2 patch set
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1670397 13f79535-47bb-0310-9956-ffa450edef68
2015-03-31 17:12:51 +00:00
0a431ef862 core, modules: like r1657897 but for core and other modules than mod_proxy.
More uses of ap_map_http_request_error() and AP_FILTER_ERROR so that we never
return an HTTP error status from a handler if some filter generated a response
already.

That is, from a handler, either ap_get_brigade() (an input filter) returned
AP_FILTER_ERROR and we must forward it to ap_die(), or ap_pass_brigade() (an
output filter) failed with any status and we must return AP_FILTER_ERROR in
any case for ap_die() to determine whether a response is needed or not.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1665625 13f79535-47bb-0310-9956-ffa450edef68
2015-03-10 17:25:17 +00:00
8e416f19be ssl_io_filter_handshake(): When a post-handshake check fails,
return an error code understood by ssl_io_filter_error().

That function needs to perform error handling, and a valid
apr_status_t needs to be returned up.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1645529 13f79535-47bb-0310-9956-ffa450edef68
2014-12-14 21:48:25 +00:00
00e4c4fbc9 tab vs space
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1633530 13f79535-47bb-0310-9956-ffa450edef68
2014-10-22 05:25:02 +00:00
d8fd328cfb mod_ssl: Fix SSL_CLIENT_VERIFY value when "SSLVerifyClient optional_no_ca" and
SSLSessionCache are used and SSL session is resumed. SSL_CLIENT_VERIFY value
has been set to SUCCESS on resumption even when originally it was set to
GENEROUS. PR 53193.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1633085 13f79535-47bb-0310-9956-ffa450edef68
2014-10-20 09:18:22 +00:00
c14ecfa1dd mod_ssl: dump SSL IO/state for the write side of the connection(s), like reads.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601919 13f79535-47bb-0310-9956-ffa450edef68
2014-06-11 14:42:32 +00:00
4af211f0ef Initialize post_handshake_rc for case where a failure has
already occurred (doesn't change execution but avoids warning
with some levels of gcc).

Pointed out by: kbrand


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588868 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 11:03:26 +00:00
f82af68aa4 mod_ssl: Add hooks to allow other modules to perform processing at
several stages of initialization and connection handling.  See
mod_ssl_openssl.h.

This is enough to allow implementation of Certificate Transparency
outside of mod_ssl.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587607 13f79535-47bb-0310-9956-ffa450edef68
2014-04-15 15:25:03 +00:00
6aafe58a02 mod_ssl: Don't flush when an EOS is received. Prepares mod_ssl
to support write completion.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542546 13f79535-47bb-0310-9956-ffa450edef68
2013-11-16 18:50:45 +00:00
725978c554 Increase minimum required OpenSSL version to 0.9.8a (in preparation
for the next mod_ssl commit, which will rely on the get_rfcX_prime_Y
functions added in that release):

- remove obsolete #defines / macros

- in ssl_private.h, regroup definitions based on whether
  they depend on TLS extension support or not

- for ECC and SRP support, set HAVE_X and change the rather awkward
  #ifndef OPENSSL_NO_X lines accordingly

For the discussion prior to taking this step, see
https://mail-archives.apache.org/mod_mbox/httpd-dev/201309.mbox/%3C524275C7.9060408%40velox.ch%3E


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527294 13f79535-47bb-0310-9956-ffa450edef68
2013-09-29 10:12:47 +00:00
728ec107c2 add some log messages and AP_DEBUG_ASSERTs for functions that should never be
called


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519264 13f79535-47bb-0310-9956-ffa450edef68
2013-09-01 12:26:25 +00:00
64a22f8933 adjust log level
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1514624 13f79535-47bb-0310-9956-ffa450edef68
2013-08-16 08:53:45 +00:00
b747d7f3c3 add high trace level log messages for debugging buffering and write completion
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1510295 13f79535-47bb-0310-9956-ffa450edef68
2013-08-04 18:21:24 +00:00
b3ce136d05 mod_ssl: Redesign NPN (Next Protocol Negotiation) API to avoid use of
hooks API and inter-module hard linkage:

* modules/ssl/mod_ssl.h: Remove NPN hooks, add "modssl_register_npn"
  optional function and callback function type declarations for
  ssl_npn_advertise_protos, ssl_npn_proto_negotiated.

* modules/ssl/mod_ssl.c: Drop hooks.
  (modssl_register_npn): New optional function implementation.
  (ssl_register_hooks): Register it.

* modules/ssl/ssl_private.h (SSLConnRec): Add npn_advertfns,
  npn_negofns array fields.

* modules/ssl/ssl_engine_kernel.c (ssl_callback_AdvertiseNextProtos): 
  Replace use of hook API with array iteration.

* modules/ssl/ssl_engine_io.c (ssl_io_filter_input): Likewise.

Reviewed by: Matthew Steele <mdsteele google.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1487772 13f79535-47bb-0310-9956-ffa450edef68
2013-05-30 07:19:07 +00:00
a47569f7c1 core, mod_ssl: Lift the restriction that prevents mod_ssl taking
full advantage of the event MPM. Enable the ability for a module
to reverse the sense of a poll event from a read to a write or vice
versa.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1470679 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 19:48:25 +00:00