301 Commits

Author SHA1 Message Date
31a4103652 mod_ssl, ab: compatibility with LibreSSL. PR 61184.
LibreSSL defines OPENSSL_VERSION_NUMBER = 2.0, but is not compatible with
all of the latest OpenSSL 1.1 API.

Address this by defining MODSSL_USE_OPENSSL_PRE_1_1_API which is true for
anything but OpenSSL >= 1.1 (for now).

Proposed by: Bernard Spil <brnrd freebsd.org>
Reviewed by: ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1803396 13f79535-47bb-0310-9956-ffa450edef68
2017-07-29 23:05:02 +00:00
c795a71b68 ab: move option processing for setting a custom
HTTP method outside of the HTTPS only handling.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1796493 13f79535-47bb-0310-9956-ffa450edef68
2017-05-28 14:10:09 +00:00
4b2a7701b1 ab: don't call malloc_init for OpenSSL 1.1.0
Patch by rjung.

The 1.1.0 compatibility macro for OpenSSL_malloc_init() causes problems
when mixed with procedure linkage stubs with some toolchains (e.g. GCC).
OpenSSL's malloc implementation doesn't recognize that the PLT stub
points back to it, which leads to infinite recursion.

Since the 1.1.0 documentation states that calling this function
explicitly is no longer necessary except "in certain shared-library
situations"(?), get rid of it.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1795830 13f79535-47bb-0310-9956-ffa450edef68
2017-05-22 16:40:54 +00:00
1d89808eba ab: follow up to r1750854: still better naming, and a C89 fix.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750960 13f79535-47bb-0310-9956-ffa450edef68
2016-07-01 15:08:10 +00:00
5259ef3f2c ab: follow up to r1750854: some comments and better naming.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750955 13f79535-47bb-0310-9956-ffa450edef68
2016-07-01 15:04:30 +00:00
639c5fa352 ab: follow up to r1750854.
Use SNI when available by default, and invert -I logic to now disable it.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750947 13f79535-47bb-0310-9956-ffa450edef68
2016-07-01 14:47:48 +00:00
dd593e6c18 ab: follow up to r1750854: put the -I at the right place for apr_getopt().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750855 13f79535-47bb-0310-9956-ffa450edef68
2016-06-30 19:01:41 +00:00
7b62ffbe80 ab: add SNI support when available.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750854 13f79535-47bb-0310-9956-ffa450edef68
2016-06-30 18:48:40 +00:00
b89b38ae13 Prepare to backport, this is not specific to VS 2015...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1748448 13f79535-47bb-0310-9956-ffa450edef68
2016-06-14 18:32:27 +00:00
94b38ab53b PR59630: include OpenSSL_Applink when compiling on Visual Studio 2015 and up
Submitted By: Jan Ehrhardt <phpdev ehrhardt.nl>
Committed By: gsmith


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1745767 13f79535-47bb-0310-9956-ffa450edef68
2016-05-27 15:47:23 +00:00
f43ff54486 ab: follow up to r1738415: EC_curve_nid2nist() available in OpenSSL-1.0.2 and later.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1741566 13f79535-47bb-0310-9956-ffa450edef68
2016-04-29 08:02:24 +00:00
fab3101178 print Server Temp Key information.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1738415 13f79535-47bb-0310-9956-ffa450edef68
2016-04-10 10:19:51 +00:00
fc8497424b Support for OpenSSL 1.1.0:
- ab: use new API SSL_CTX_set_max_proto_version()
  and SSL_CTX_set_min_proto_version() in
  combination with TLS_client_method() instead
  of the old deprecated methods.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1735891 13f79535-47bb-0310-9956-ffa450edef68
2016-03-20 18:26:22 +00:00
7f070bafe6 ab: Use caseless matching for HTTP tokens (e.g. content-length).
PR 59111.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1733537 13f79535-47bb-0310-9956-ffa450edef68
2016-03-04 00:10:10 +00:00
967edd5581 Support for OpenSSL 1.1.0
- ab


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1728907 13f79535-47bb-0310-9956-ffa450edef68
2016-02-07 01:03:15 +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
4ba6c05ebe Silence a sparse warning about inconsistent indenting
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1700320 13f79535-47bb-0310-9956-ffa450edef68
2015-08-31 19:50:19 +00:00
62eef24b7f ab: Add missing longest request (100%) to CSV export.
Submitted by: Marcin Fabrykowski <bugzilla fabrykowski.pl>
Committed by: ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1661913 13f79535-47bb-0310-9956-ffa450edef68
2015-02-24 12:14:05 +00:00
430892c1ab ab: Use only one connection to determine working destination socket address.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1628388 13f79535-47bb-0310-9956-ffa450edef68
2014-09-30 10:39:41 +00:00
79a0532100 ab: try all destination socket addresses returned by apr_sockaddr_info_get
instead of failing on first one when not available.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1626956 13f79535-47bb-0310-9956-ffa450edef68
2014-09-23 07:12:54 +00:00
43803691a0 ab: increase request and response header size to 8192 bytes,
fix potential buffer-overflow in Server: header handling.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1622450 13f79535-47bb-0310-9956-ffa450edef68
2014-09-04 10:52:24 +00:00
b19b5a54c3 * support/ab.c: Fix crash caused by integer overflow when printing stats with
lot of requests (for example -n 500000000).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1617913 13f79535-47bb-0310-9956-ffa450edef68
2014-08-14 12:15:31 +00:00
f0f9b0bfb3 ab: support custom HTTP method with -m argument. PR 56604.
Example: ab -n 1 -m PING http://127.0.0.1/

Submitted By: Roman Jurkov <winfinit gmail com>
Committed By: ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601076 13f79535-47bb-0310-9956-ffa450edef68
2014-06-07 08:45:56 +00:00
252dcdcf31 * support/ab.c: Revert accidental version bump in r1580928.
(Although it seems likely this *should* have been bumped sometime
   since 2006?)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1580935 13f79535-47bb-0310-9956-ffa450edef68
2014-03-24 17:43:10 +00:00
31badda9f4 * support/ab.c (write_request): Avoid redundant write(,,0) preceding
the write() of the request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1580928 13f79535-47bb-0310-9956-ffa450edef68
2014-03-24 17:20:47 +00:00
1a3a8daf9b follow-up to r1542533:
fix format string (unsigned vs. size_t)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1543020 13f79535-47bb-0310-9956-ffa450edef68
2013-11-18 12:52:03 +00:00
b792a83b1e Check all memory allocations and abort on failure
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542533 13f79535-47bb-0310-9956-ffa450edef68
2013-11-16 17:11:55 +00:00
71672c7113 ab: Fix potential buffer overflows when processing the T and X
command-line options.

PR: 55360
Submitted by: Mike Rumph <mike.rumph oracle.com>
Reviewed by: trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1510707 13f79535-47bb-0310-9956-ffa450edef68
2013-08-05 20:24:39 +00:00
288ff9e014 Add a new -l parameter in order not to check the length of the responses. This can be usefull with dynamic pages.
PR9945, PR27888, PR42040

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1488644 13f79535-47bb-0310-9956-ffa450edef68
2013-06-02 06:30:03 +00:00
10bcdb2c12 Check if malloc succeeded
PR54344 [Bill Parker, wp02855 gmail com]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1488492 13f79535-47bb-0310-9956-ffa450edef68
2013-06-01 08:43:12 +00:00
49082c9492 3rd patch from PR45355
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1488471 13f79535-47bb-0310-9956-ffa450edef68
2013-06-01 06:03:32 +00:00
b1976f87a2 The 2 first patches from PR45355 have been ported
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451849 13f79535-47bb-0310-9956-ffa450edef68
2013-03-02 08:13:16 +00:00
844012a006 ab: add the possibility to define a socket timeout (-s timeout)
[Guido Serra <zeph fsfe org>]

Also some changes In usage():
- reword -t option to be more clear with the new -s
- add missing -q
- add the new -s option
- reword some options to better match online documentation

ab.xml claimed that -s was already there, but nothing in the code looks like that.
So, I guess it only landed on the online doc...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422937 13f79535-47bb-0310-9956-ffa450edef68
2012-12-17 14:10:50 +00:00
c2b7802e78 Allow forced setting of TLS1.1 and TLS1.2 protocols with
the -f command-line switch, and adapt the output to more accurately
report what SSL/TLS protocol was negotiated (use SSL_get_version()
instead of SSL_CIPHER_get_version()).

PR: 53916
Submitted by: Nicolás Pernas Maradei <nico emutex com>
Reviewed/amended by: Kaspar Brand


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1395225 13f79535-47bb-0310-9956-ffa450edef68
2012-10-07 06:26:53 +00:00
9c659fecb3 ab: Fix read failure when targeting SSL server.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1371791 13f79535-47bb-0310-9956-ffa450edef68
2012-08-10 17:54:16 +00:00
661d00528c When -B is specified, search for a host address in the
same family as the specified outbound interface.  If 
impossible, fail at name resolution instead of bind().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1364133 13f79535-47bb-0310-9956-ffa450edef68
2012-07-21 17:39:38 +00:00
6c85d01a06 * support/ab.c (test, start_connect): Only bind the local end of the
socket (and look up an address for it) if -B is specified.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351737 13f79535-47bb-0310-9956-ffa450edef68
2012-06-19 15:13:37 +00:00
fb5cf8f74f If MaxMemFree is set, set SSL_MODE_RELEASE_BUFFERS in mod_ssl.
Always set SSL_MODE_RELEASE_BUFFERS in ab.

PR: 51618
Submitted by: Cristian Rodríguez <crrodriguez opensuse org>, Stefan Fritsch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1178079 13f79535-47bb-0310-9956-ffa450edef68
2011-10-01 19:48:14 +00:00
1951a037bf More cleanup: Expand tabs and some more indentation fixes
No functional change


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
1eb818742f Drop support for the RSA BSAFE SSL-C toolkit from configure,
and remove #ifdef'ed code from mod_ssl and ab where applicable.

Consensus for dropping support for SSL/TLS toolkits other
than OpenSSL was reached on dev@httpd in June 2010 (message
with ID <20100602162310.GA11156@redhat.com> and follow-ups).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1154683 13f79535-47bb-0310-9956-ffa450edef68
2011-08-07 10:29:09 +00:00
4d00c63be6 Support specifying the local address to use.
PR: 48930.
Submitted by: Peter Schuller <scode spotify com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1139530 13f79535-47bb-0310-9956-ffa450edef68
2011-06-25 12:00:26 +00:00
51226bdcca Fix various "variable 'x' set but not used" warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1125877 13f79535-47bb-0310-9956-ffa450edef68
2011-05-22 07:42:18 +00:00
2014acf62f Improvements found by cppcheck:
remove some unused variables and dead assignments, reduce the scope of some
variables, add some parens to improve readability


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1103459 13f79535-47bb-0310-9956-ffa450edef68
2011-05-15 16:58:45 +00:00
ded32d4e37 mod_ssl, ab: Support OpenSSL compiled without SSLv2 support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1090367 13f79535-47bb-0310-9956-ffa450edef68
2011-04-08 17:56:20 +00:00
828cb4661e * support/ab.c (test): Catch more calloc failures.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082586 13f79535-47bb-0310-9956-ffa450edef68
2011-03-17 16:42:16 +00:00
39a167fb32 Renamed optarg -> opt_arg to avoid name clashes with system-own optarg;
removed leftover from IDE build times.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1004962 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 10:05:22 +00:00
15734940ad simplify walking through array of returned apr_pollfd_t
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@998729 13f79535-47bb-0310-9956-ffa450edef68
2010-09-19 20:54:34 +00:00
a20a0acb17 fix one error message, eliminate another that will never
be issued (since !n occurs when status != APR_SUCCESS)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@998726 13f79535-47bb-0310-9956-ffa450edef68
2010-09-19 20:47:38 +00:00
f4b1d82d93 Fix usage output.
PR: 45331


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986979 13f79535-47bb-0310-9956-ffa450edef68
2010-08-18 23:11:56 +00:00