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

395 Commits

Author SHA1 Message Date
973b98f879 Follow up to r1735882: fill in APLOGNO().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1735941 13f79535-47bb-0310-9956-ffa450edef68
2016-03-21 10:21:52 +00:00
8bcf9ed952 Support for OpenSSL 1.1.0:
- Followup to r1735875:
    ssl_util_thread_setup() is gone.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1735925 13f79535-47bb-0310-9956-ffa450edef68
2016-03-21 08:47:15 +00:00
10ef9761a0 Support for OpenSSL 1.1.0:
- use new API SSL_CTX_set_max_proto_version()
  and SSL_CTX_set_min_proto_version() instead
  of SSL_CTX_set_options()
- use new methods TLS_client_method() and
  TLS_server_method()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1735882 13f79535-47bb-0310-9956-ffa450edef68
2016-03-20 14:20:52 +00:00
5bc7c3ca2d mod_ssl: follow up to r1734561.
Simplify CRL check mode and flags handling/merging by using a single mask (int).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1735337 13f79535-47bb-0310-9956-ffa450edef68
2016-03-16 22:54:27 +00:00
bafafe600b mod_ssl: Add no_crl_for_cert_ok flag to SSLCARevocationCheck directive
to opt-in previous behaviour (2.2) with CRLs verification when checking
certificate(s) with no corresponding CRL.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734561 13f79535-47bb-0310-9956-ffa450edef68
2016-03-11 13:51:17 +00:00
d7639a5ad0 Support OpenSSL 1.1.0.
- use common code for OpenSSL pre-1.1.0 and
  1.1.0 where possible.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1730422 13f79535-47bb-0310-9956-ffa450edef68
2016-02-14 22:40:07 +00:00
9b4551dea9 Add remark about backport obstacle.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1730351 13f79535-47bb-0310-9956-ffa450edef68
2016-02-14 16:36:04 +00:00
f80ac38222 Support for OpenSSL 1.1.0:
- don't check for SSLeay_version() in configure
  The function no longer exists in 1.1.0.
  It was replaced by OpenSSL_version().
- Switch between SSLeay_version(U) and
  OpenSSL_version() depending on version
  in modules/ssl/ssl_util_ssl.h.
- Use MODSSL_LIBRARY_DYNTEXT everywhere.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1728981 13f79535-47bb-0310-9956-ffa450edef68
2016-02-07 16:12:34 +00:00
8bc4871c57 Support for OpenSSL 1.1.0:
- mod_ssl
Look out for "XXX: OpenSSL 1.1.0:" for a few
open problems.

Not tested with test suite yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1728909 13f79535-47bb-0310-9956-ffa450edef68
2016-02-07 01:20:37 +00:00
44ce30494e Added many log numbers to log statements that
had none.

Handled all files in modules/.

I used the coccinelle script provided by Stefan.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725392 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 00:03:18 +00:00
43b7db9c8c mod_ssl: follow up to r1720129.
Free ecparams read from certificate file(s) on startup.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1723295 13f79535-47bb-0310-9956-ffa450edef68
2016-01-06 12:11:36 +00:00
51da86c0be * mod_ssl: Free dhparams when getting DH params. This fixes issue when
SSLCryptoDevice does not get unregistered because of non-zero refcount
  during the mod_ssl unload happening on httpd startup.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1720129 13f79535-47bb-0310-9956-ffa450edef68
2015-12-15 11:50:48 +00:00
908587e75f deduplicate the code handling the directory traversal for the
SSL[Proxy]CACertificatePath and SSLProxyMachineCertificatePath
directives


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705539 13f79535-47bb-0310-9956-ffa450edef68
2015-09-27 14:08:16 +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
0a30649059 Append :!aNULL:!eNULL:!EXP to the cipher string settings,
instead of prepending !aNULL:!eNULL:!EXP: (as was the case in 2.4.7
and later). Enables support for configuring the SUITEB* cipher
strings introduced in OpenSSL 1.0.2. PR 58213.

Apply the same treatment to the "SSLOpenSSLConfCmd CipherString ..." directive.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1702643 13f79535-47bb-0310-9956-ffa450edef68
2015-09-12 15:33:28 +00:00
ce587ed02f mod_ssl: allow enabling of SSLProtocols even though they are disabled by OpenSSL
by default. Show warning in that case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1692258 13f79535-47bb-0310-9956-ffa450edef68
2015-07-22 12:08:01 +00:00
69081b3739 mod_ssl: follow up to r1527291.
Always prepend "!aNULL:!eNULL:" to SSL_DEFAULT_CIPHER_LIST (default for
SSL[Proxy]CipherSuite) since we support OpenSSL versions where this was
not yet included by default.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1679470 13f79535-47bb-0310-9956-ffa450edef68
2015-05-14 22:38:20 +00:00
a5c1e92732 mod_ssl namespacing: Move SSL_CTX_use_certificate_chain() into ssl_engine_init.c
and make it a static function called use_certificate_chain().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677834 13f79535-47bb-0310-9956-ffa450edef68
2015-05-05 14:29:11 +00:00
aa6037fa61 mod_ssl namespacing: Move modssl_X509_INFO_load_file() into ssl_engine_init.c
and make it a static function called load_x509_info().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677832 13f79535-47bb-0310-9956-ffa450edef68
2015-05-05 14:20:19 +00:00
2548969450 mod_ssl namespacing: Merge SSL_X509_INFO_load_path() into its only caller
ssl_init_proxy_certs() in ssl_engine_init.c. No functional change.
Review by: kbrand


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677830 13f79535-47bb-0310-9956-ffa450edef68
2015-05-05 14:09:35 +00:00
8fd38131f9 mod_ssl namespacing: SSL_X509_INFO_load_file -> modssl_X509_INFO_load_file
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677159 13f79535-47bb-0310-9956-ffa450edef68
2015-05-01 14:49:45 +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
1e4c1e7fd2 mod_ssl namespacing: SSL_X509_NAME_to_string -> modssl_X509_NAME_to_string
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677153 13f79535-47bb-0310-9956-ffa450edef68
2015-05-01 14:34:38 +00:00
35296edace mod_ssl namespacing: SSL_X509_getBC -> modssl_X509_getBC
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677146 13f79535-47bb-0310-9956-ffa450edef68
2015-05-01 14:15:22 +00:00
c3f41f5e13 mod_ssl namespacing: Rename SSL_init_app_data2_idx, SSL_get_app_data2,
and SSL_set_app_data2 from SSL_* to modssl_*. Update references in
README.dsov.* files. Rename static variable SSL_app_data2_idx to just
app_data2_idx since the symbol is internal to ssl_util_ssl.c.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677143 13f79535-47bb-0310-9956-ffa450edef68
2015-05-01 14:03:04 +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
de91f95a16 libressl fix for removed ENGINE_CTRL_CHIL_SET_FORKCHECK
Submitted By: Stuart Henderson <sthen openbsd.org>
Commited By: covener




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1673455 13f79535-47bb-0310-9956-ffa450edef68
2015-04-14 15:56:30 +00:00
7a99991874 More ALPN goodness
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1670434 13f79535-47bb-0310-9956-ffa450edef68
2015-03-31 19:12:08 +00:00
2c379ac463 * mod_ssl: fix small memory leak in ssl_init_server_certs when ECDH is used.
SSL_CTX_set_tmp_ecdh increases reference count, so we have to call EC_KEY_free,
otherwise eckey will not be freed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1666363 13f79535-47bb-0310-9956-ffa450edef68
2015-03-13 07:32:46 +00:00
4c52577a7f mod_ssl: revert r1653906, will commit an alternative just after.
The issue with r1653906 is that existing configurations like
"SSLProtocol -SSLv3" (where the default is assumed to be ALL)
won't work anymore.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1653993 13f79535-47bb-0310-9956-ffa450edef68
2015-01-22 18:27:46 +00:00
6d6a8a16f1 Fix merge problem with SSLProtocol that made SSLProtocol ALL ignored
in virtualhost context.

Submitted By: Michael Kaufmann <apache-bugzilla michael-kaufmann.ch>
Commited By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1653906 13f79535-47bb-0310-9956-ffa450edef68
2015-01-22 15:19:39 +00:00
bf93fed8a1 Add SSLSessionTickets (on|off).
It controls the use of TLS session tickets
(RFC 5077). Default is unchanged (on).

Using session tickets without restarting
the web server with an appropriate frequency
(e.g. daily) compromises perfect forward
secrecy.

As long as we do not have a nice key management
there should be a way to deactivate session
tickets.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1650310 13f79535-47bb-0310-9956-ffa450edef68
2015-01-08 15:34:10 +00:00
08c20e7f58 tab vs space
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1638412 13f79535-47bb-0310-9956-ffa450edef68
2014-11-11 21:16:11 +00:00
7cc90787fb Move OCSP stapling information from a per-certificate store
(ex_data attached to an X509 *) to a per-server hash which is
allocated from the pconf pool. Fixes PR 54357, PR 56919 and
a leak with the certinfo_free cleanup function (missing
OCSP_CERTID_free).

* modules/ssl/ssl_util_stapling.c: drop certinfo_free, and add
  ssl_stapling_certid_free (used with apr_pool_cleanup_register).
  Switch to a stapling_certinfo hash which is keyed by the SHA-1
  digest of the certificate's DER encoding, rework ssl_stapling_init_cert
  to only store info once per certificate (allocated from the pconf
  to the extent possible) and extend the logging.

* modules/ssl/ssl_private.h: adjust prototype for
  ssl_stapling_init_cert, replace ssl_stapling_ex_init with
  ssl_stapling_certinfo_hash_init

* modules/ssl/ssl_engine_init.c: adjust ssl_stapling_* calls

Based on initial work by Alex Bligh <alex alex.org.uk>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1629372 13f79535-47bb-0310-9956-ffa450edef68
2014-10-04 10:58:49 +00:00
56d0c25725 Add missing APLOGNO.
Refactor some lines to keep APLOGNO on the same line as ap_log_error, when applicable.
Split lines longer than 80.
Improve alignment.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1612068 13f79535-47bb-0310-9956-ffa450edef68
2014-07-20 09:32:58 +00:00
5f7ec543ec Extend the scope of SSLSessionCacheTimeout to sessions
resumed by TLS session resumption (RFC 5077).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1610311 13f79535-47bb-0310-9956-ffa450edef68
2014-07-13 22:30:44 +00:00
eb681e6e60 * modules/ssl/ssl_engine_init.c: Make DH handling a bit more generic,
and adjust selection logic to prefer use of larger not smaller keys.
  (init_dh_params, free_dh_params, modssl_get_dh_params): Use array of
  structs to store and initialize DH parameters up to 8192-bit.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1605827 13f79535-47bb-0310-9956-ffa450edef68
2014-06-26 15:49:49 +00:00
33ef4d63bc * modules/ssl/ssl_engine_init.c (make_dh_params): Remove redundant
temporary variable; no functional change.
  (free_dh_params): Add comment.

Submitted by: rpluem, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1603915 13f79535-47bb-0310-9956-ffa450edef68
2014-06-19 15:09:15 +00:00
d3eac27e32 Create DH parameters from OpenSSL at module init, avoiding (very
minor) race and leaks:

* modules/ssl/ssl_engine_init.c (make_dh_params): Moved/rejigged
  variant of make_get_dh() macro.
  (init_dh_params, free_dh_params): New functions.
  (modssl_get_dh_params): Split out from ssl_callback_TmpDH.
  (ssl_init_Module, ssl_init_ModuleKill): Use new init_/free_.

* modules/ssl/ssl_engine_kernel.c: Moved out DH parameter handling.
  (ssl_callback_TmpDH): Use modssl_get_dh_params.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1598107 13f79535-47bb-0310-9956-ffa450edef68
2014-05-28 19:14:28 +00:00
0fca81d239 Also clear the error queue before calling SSL_CTX_use_certificate[_chain]_file
(workaround for OpenSSL versions before 0.9.8h, see
https://rt.openssl.org/Ticket/Display.html?user=guest&pass=guest&id=1513).

PR 56410.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588427 13f79535-47bb-0310-9956-ffa450edef68
2014-04-18 09:07:19 +00:00
7c00e38807 Follow up to r1587607:
The init_server hook is responsible for telling why init
failed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587635 13f79535-47bb-0310-9956-ffa450edef68
2014-04-15 17:00:24 +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
50ebf352a8 Only read "active" values from the key_files array. PR 56306.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1585918 13f79535-47bb-0310-9956-ffa450edef68
2014-04-09 09:35:41 +00:00
cbba0dbc00 Bring SNI behavior into better conformance with RFC 6066:
- no longer send a warning-level unrecognized_name(112) alert
  when no matching vhost is found (PR 56241)

- at startup, only issue warnings about IP/port conflicts and name-based
  SSL vhosts when running with an OpenSSL without TLS extension support
  (almost 5 years after SNI was added to 2.2.x, the
  "[...] only work for clients with TLS server name indication support"
  warning feels obsolete)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1585090 13f79535-47bb-0310-9956-ffa450edef68
2014-04-05 12:57:43 +00:00
72889d15f8 A bug in some older versions of OpenSSL will cause a crash
in SSL_get_certificate for servers where the certificate hasn't
been sent.

Workaround by setting the ssl structure to client mode which
bypasses the faulty code in OpenSSL. Normally setting a server
ssl structure to client mode would cause problems later on:
but we are freeing the structure immediately without attempting
to use it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1576741 13f79535-47bb-0310-9956-ffa450edef68
2014-03-12 13:52:26 +00:00
ba0d11111a update APLOGNO for r1564760
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1565081 13f79535-47bb-0310-9956-ffa450edef68
2014-02-06 05:25:12 +00:00
1f3cc513a0 With OpenSSL 1.0.2 or later, enable OCSP stapling in a loop based on
SSL_CTX_set_current_cert(), near the end of ssl_init_server_ctx.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1564760 13f79535-47bb-0310-9956-ffa450edef68
2014-02-05 13:02:35 +00:00
55f9574e26 enable auto curve selection for ephemeral ECDH keys
when compiled against OpenSSL 1.0.2 or later


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1563420 13f79535-47bb-0310-9956-ffa450edef68
2014-02-01 14:04:23 +00:00