1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-17 00:03:29 +03:00
Commit Graph

1219 Commits

Author SHA1 Message Date
Joe Orton
abb1385ef5 Omitted from r1620926 in error.
Add API to support TLS channel bindings with mod_ssl.

* modules/ssl/mod_ssl.h: Define ssl_get_tls_cb.

* modules/ssl/ssl_engine_vars.c (ssl_get_tls_cb): New function.

Submitted by: Simo Sorce <simo redhat.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1620927 13f79535-47bb-0310-9956-ffa450edef68
2014-08-27 16:12:08 +00:00
Joe Orton
b86c933b08 Add API to support TLS channel bindings with mod_ssl.
* modules/ssl/mod_ssl.h: Define ssl_get_tls_cb.

* modules/ssl/ssl_engine_vars.c (ssl_get_tls_cb): New function.

Submitted by: Simo Sorce <simo redhat.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1620926 13f79535-47bb-0310-9956-ffa450edef68
2014-08-27 16:11:17 +00:00
Jeff Trawick
dca1da20e3 Add message numbers to mod_ssl_ct messages with severity > debug.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1612122 13f79535-47bb-0310-9956-ffa450edef68
2014-07-20 17:08:20 +00:00
Christophe Jaillet
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
Christophe Jaillet
089d2e0373 Do not use deprecated define.
No change in generated code because MODULE_MAGIC_NUMBER is defined as:
   #define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1611871 13f79535-47bb-0310-9956-ffa450edef68
2014-07-19 09:46:20 +00:00
Guenter Knauf
87377937a7 Fixed mod_ssl NetWare build.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1611012 13f79535-47bb-0310-9956-ffa450edef68
2014-07-16 13:50:44 +00:00
Rainer Jung
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
Jeff Trawick
070d6672c9 Set an error note for requests rejected due to SSLStrictSNIVHostCheck.
This allows custom error documents to include the specific reason
for denying access to the server.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1609936 13f79535-47bb-0310-9956-ffa450edef68
2014-07-12 14:48:04 +00:00
Jeff Trawick
fe07b16cc2 Perform SNI checks only on the initial request. In particular,
if these checks detect a problem, the checks shouldn't return an
error again when processing an ErrorDocument redirect for the
original problem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1609914 13f79535-47bb-0310-9956-ffa450edef68
2014-07-12 13:26:42 +00:00
Jeff Trawick
f61bb82760 The SNI callback already logs a debug message when the vhost
is found or no vhost matches.  Log one when no name is provided
by the client.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1608284 13f79535-47bb-0310-9956-ffa450edef68
2014-07-06 18:58:19 +00:00
Jeff Trawick
2d53bf18ca APR_THREAD_FUNC decorator needed for 32-bit builds on Windows
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1606337 13f79535-47bb-0310-9956-ffa450edef68
2014-06-28 12:55:08 +00:00
Joe Orton
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
Joe Orton
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
Yann Ylavic
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
Yann Ylavic
ec3eebef53 mod_ssl: SSL_smart_shutdown(): follow up to r1601184.
Use SSL_get_wbio() to comply with OPENSSL_NO_SSL_INTERN.
Stop SSL shutdown loop when flush fails.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601274 13f79535-47bb-0310-9956-ffa450edef68
2014-06-08 23:54:58 +00:00
Yann Ylavic
6502fec22a mod_ssl: Ensure that the SSL close notify alert is flushed to the client.
PR54998.

Submitted By: Tim Kosse <tim.kosse filezilla-project.org>, ylavic
Committed By: ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601184 13f79535-47bb-0310-9956-ffa450edef68
2014-06-07 22:53:52 +00:00
Joe Orton
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
Ruediger Pluem
3adb3b8bf3 * Hand out the same DH structure in ssl_callback_TmpDH set by
SSL_CTX_set_tmp_dh_callback though once generated as we leak
  memory otherwise and freeing the structure up after use would be
  hard to track and in fact is not needed at all as it is safe to
  use the same parameters over and over again security wise (in
  contrast to the keys itself) and code safe as the returned structure
  is duplicated by OpenSSL anyway. Hence no modification happens
  to our copy.

Observed by: rjung
Reviewed by: kbrand


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1597349 13f79535-47bb-0310-9956-ffa450edef68
2014-05-24 20:28:56 +00:00
Christophe Jaillet
2d01df12ea Fix duplicate APLOGNO
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1596108 13f79535-47bb-0310-9956-ffa450edef68
2014-05-20 04:02:49 +00:00
Jeff Trawick
048df00d71 Follow-up to r1588987:
Fix doc and code confusion about the trust/distrust flag; 1 is
distrust, 0 or NULL/- is trust.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1595861 13f79535-47bb-0310-9956-ffa450edef68
2014-05-19 12:24:06 +00:00
Yann Ylavic
54f9353df0 mod_ssl: follow up to r1583191.
Use type BOOL for modssl_ctx_t's field ocsp_use_request_nonce.
Suggested by: kbrand.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591401 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 17:15:07 +00:00
Jeff Trawick
a5d79394e3 Follow-up to r1587607:
Export new mod_ssl APIs when using traditional Windows build mechanism


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589699 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 12:51:48 +00:00
Jeff Trawick
4921c237ba allow operation without any logs configured or without the
log client tool configured

this supports configurations where SCTs are managed by the admin or
by some other infrastructure


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589398 13f79535-47bb-0310-9956-ffa450edef68
2014-04-23 12:45:45 +00:00
Jeff Trawick
d4515e5187 ensure that the post-config hook runs after that of mod_ssl
(mod_ssl_ct looks for stuff that should have been found
while mod_ssl ran)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589389 13f79535-47bb-0310-9956-ffa450edef68
2014-04-23 12:38:03 +00:00
Jeff Trawick
c51e4d9cbc Add module mod_ssl_ct, which provides an implementation of Certificate
Transparency (RFC 6962) for httpd.

mod_ssl_ct requires OpenSSL 1.0.2 (in beta) and must be explicitly
enabled via configure.

Note that support/ctauditscts is purposefully not installed; it
does not properly function due to a dependency on a 
certificate-transparency open source project tool which itself is
not sufficiently complete at this time.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588987 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 21:14:21 +00:00
Jeff Trawick
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
Kaspar Brand
afe9fee88c ssl_stapling_init_cert: do not return success when no responder URI is found
stapling_renew_response: abort early (before apr_uri_parse) if ocspuri is empty


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588853 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 06:54:41 +00:00
Kaspar Brand
eced8a0d15 ssl_callback_TmpDH: for OpenSSL 1.0.2 and later, set the current cert to the
one actually used for the connection before calling SSL_get_privatekey(ssl)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588851 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 06:39:24 +00:00
Kaspar Brand
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
Jeff Trawick
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
Jeff Trawick
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
Jeff Trawick
f5ec1f9b30 remove stray character in comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1586727 13f79535-47bb-0310-9956-ffa450edef68
2014-04-11 17:41:41 +00:00
Kaspar Brand
b65275e2e9 Reverse the order when merging global and vhost-level config arrays.
Putting the vhost-level elements last allows overriding global settings
(for the deprecated SSLRequire directive, the order is irrelevant,
all of them must be met, cf. ssl_engine_kernel.c:ssl_hook_Access).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1585919 13f79535-47bb-0310-9956-ffa450edef68
2014-04-09 09:38:02 +00:00
Kaspar Brand
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
Kaspar Brand
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
Yann Ylavic
0e37047e3d mod_ssl: follow up to r1583191.
New SSLOCSPUseRequestNonce directive's manual and CHANGES.

Non functional code changes (modssl_ctx_t's field ocsp_use_request_nonce
grouped with other OCSP ones, nested if turned to a single AND condition).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1584098 13f79535-47bb-0310-9956-ffa450edef68
2014-04-02 17:21:28 +00:00
Yann Ylavic
6508ac17c2 mod_ssl: send OCSP request's nonce according to SSLOCSPUseRequestNonce on/off. PR 56233.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1583191 13f79535-47bb-0310-9956-ffa450edef68
2014-03-30 19:25:20 +00:00
Stephen Henson
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
Victor J. Orlikowski
d165c70c09 Quick spelling fix
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1566449 13f79535-47bb-0310-9956-ffa450edef68
2014-02-09 22:04:54 +00:00
Christophe Jaillet
d647d32f5f typo in comments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1566428 13f79535-47bb-0310-9956-ffa450edef68
2014-02-09 21:24:38 +00:00
Kaspar Brand
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
Kaspar Brand
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
Jeff Trawick
66b8feb600 fix a few spelling errors
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1563894 13f79535-47bb-0310-9956-ffa450edef68
2014-02-03 13:50:14 +00:00
Kaspar Brand
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
Kaspar Brand
b83efdbb99 Followup fix for r1553824:
also pass the file name to ssl_load_encrypted_pkey, to make sure that we
retry with the same filename we used for SSL_CTX_use_PrivateKey_file first


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1563417 13f79535-47bb-0310-9956-ffa450edef68
2014-02-01 13:57:06 +00:00
Jan Kaluža
cc94935e7e mod_ssl: Do not print content of SSL CA directories during -DDUMP_CA_CERTS, make
-DDUMP_CERTS and -DDUMP_CA_CERTS mutually exclusive and document them.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1558775 13f79535-47bb-0310-9956-ffa450edef68
2014-01-16 12:49:37 +00:00
Joe Orton
7f2edaa14e * modules/ssl/ssl_engine_config.c (ssl_cmd_SSLCompression): Fail if
enabled *and* if OpenSSL does not make any compression methods
  available.  Tweak wording for failure without SSL_OP_NO_COMPRESSION.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1556473 13f79535-47bb-0310-9956-ffa450edef68
2014-01-08 09:39:44 +00:00
Jeff Trawick
924e07c32b Fix config merging of SSLOCSPEnable and SSLOCSPOverrideResponder.
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1555631 13f79535-47bb-0310-9956-ffa450edef68
2014-01-05 21:18:28 +00:00
Kaspar Brand
4c079f6ff3 make the ppcb_arg initialization a bit more uniform and easier to read
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1555467 13f79535-47bb-0310-9956-ffa450edef68
2014-01-05 07:58:54 +00:00
Kaspar Brand
a84af8f546 More finishing touches for SSLOpenSSLConfCmd:
- add documentation
- clear the error queue before executing the next SSL_CONF_cmd
- if needed, configure OCSP stapling after a "Certificate" command
- ifdef ssl_cmd_SSLOpenSSLConfCmd in ssl_private.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1555464 13f79535-47bb-0310-9956-ffa450edef68
2014-01-05 07:38:28 +00:00