1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

267 Commits

Author SHA1 Message Date
Yann Ylavic
f9ad2754f7 mod_proxy, mod_ssl: Handle SSLProxy* directives in <Proxy> sections,
allowing per backend TLS configuration.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1740928 13f79535-47bb-0310-9956-ffa450edef68
2016-04-26 00:04:57 +00:00
Yann Ylavic
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
Yann Ylavic
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
Ruediger Pluem
aef1c86d73 * Introduce SSLOCSPProxyURL in order to do OCSP requests via a HTTP proxy.
Documentation to follow.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726881 13f79535-47bb-0310-9956-ffa450edef68
2016-01-26 20:24:33 +00:00
Christophe Jaillet
cf3cb2849f Constify + save a few bytes in conf pool when parsing SSLRequire
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1718514 13f79535-47bb-0310-9956-ffa450edef68
2015-12-08 06:34:48 +00:00
Christophe Jaillet
d4e9c5ae55 Save a few bytes in conf pool.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715273 13f79535-47bb-0310-9956-ffa450edef68
2015-11-19 20:58:55 +00:00
Kaspar Brand
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
Kaspar Brand
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
Stefan Eissing
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
Yann Ylavic
8bec5a1513 mod_ssl: Remove deprecated SSLCertificateChainFile warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1685779 13f79535-47bb-0310-9956-ffa450edef68
2015-06-16 11:58:47 +00:00
Yann Ylavic
d631ce4fe4 mod_ssl: revert r1685052, r1685078 and r1685097.
Will remove the deprecation message in a follow up commit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1685777 13f79535-47bb-0310-9956-ffa450edef68
2015-06-16 11:53:13 +00:00
Yann Ylavic
bf339b65d6 Follow up to r1685052: reduce log level to INFO.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1685097 13f79535-47bb-0310-9956-ffa450edef68
2015-06-12 14:58:58 +00:00
Yann Ylavic
24f248a77a Follow up to r1685052: use retained data pattern instead,
as suggested by trawick.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1685078 13f79535-47bb-0310-9956-ffa450edef68
2015-06-12 12:31:13 +00:00
Yann Ylavic
488f6e0459 mod_ssl: Warn about deprecated SSLCertificateChainFile once at startup,
on first usage only.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1685052 13f79535-47bb-0310-9956-ffa450edef68
2015-06-12 09:07:34 +00:00
Jeff Trawick
9db0d19d21 mod_ssl OCSP Stapling: Don't block initial handshakes while refreshing
the OCSP response for a different certificate.  mod_ssl has an additional
global mutex, "ssl-stapling-refresh".

Not mentioned in CHANGES:

Stapling no longer uses a mutex when using a stapling cache
implementation which doesn't require it.  (A further, unrelated
code change to mod_ssl is required to allow the use of memcache 
as a stapling cache, and I haven't tested with distcache; thus
it isn't clear if this helps in practice yet.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1679032 13f79535-47bb-0310-9956-ffa450edef68
2015-05-12 18:59:29 +00:00
Kaspar Brand
700ffbf9bf consistently output SSLCertificateChainFile deprecation warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1676085 13f79535-47bb-0310-9956-ffa450edef68
2015-04-26 06:43:26 +00:00
Kaspar Brand
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
Stefan Sperling
2b7c1b2b14 mod_ssl: Make the config parser complain if SSLRandomSeed specifies
the Entropy Gathering Daemon (EGD) as source while the underlying
SSL library does not support EGD (e.g. in case of LibreSSL).

Suggested and reviewed by: kbrand


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1675410 13f79535-47bb-0310-9956-ffa450edef68
2015-04-22 16:39:20 +00:00
Jeff Trawick
f7d9af2eb4 Follow-up to r1520445:
Tweak error message for clarity


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1673769 13f79535-47bb-0310-9956-ffa450edef68
2015-04-15 13:55:46 +00:00
Christophe Jaillet
2705372157 Tweak log message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1672985 13f79535-47bb-0310-9956-ffa450edef68
2015-04-12 06:57:07 +00:00
Jim Jagielski
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
Yann Ylavic
a365a65513 mod_ssl: Fix merge problem with SSLProtocol that made SSLProtocol ALL ignored
in virtualhost context (new version of r1653906 reverted by r1653993).

Submitted By: Michael Kaufmann <apache-bugzilla michael-kaufmann.ch>
Committed/modified By: ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1653997 13f79535-47bb-0310-9956-ffa450edef68
2015-01-22 18:37:06 +00:00
Yann Ylavic
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
Eric Covener
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
Rainer Jung
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
Christophe Jaillet
10ab77117b tab vs space
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1633531 13f79535-47bb-0310-9956-ffa450edef68
2014-10-22 05:25:23 +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
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
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
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
Jeff Trawick
fcf66e6281 fix typo in error message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1555423 13f79535-47bb-0310-9956-ffa450edef68
2014-01-04 21:44:34 +00:00
Kaspar Brand
1e80b68ec1 Remove the hardcoded algorithm-type dependency for the SSLCertificateFile
and SSLCertificateKeyFile directives, and deprecate SSLCertificateChainFile

Splitting the patch into smaller pieces turned out to be infeasible,
unfortunately, due to the heavily intertwined code in ssl_engine_config.c,
ssl_engine_init.c and ssl_engine_pphrase.c, which all depends on the
modssl_pk_server_t data structure. For better comprehensibility,
a detailed listing of the changes follows:

ssl_private.h
- drop the X509 certs and EVP_PKEY keys arrays from modssl_pk_server_t
- use apr_array_header_t for cert_files and key_files
- drop tPublicCert from SSLModConfigRec
- drop the ssl_algo_t struct and the SSL_ALGO_* and SSL_AIDX_* constants

ssl_engine_config.c
- change to apr_array_header_t for SSLCertificate[Key]File
- drop ssl_cmd_check_aidx_max, i.e. allow an arbitrary number of certs
  and keys (in theory; currently OpenSSL does not support more than
  one cert/key per algorithm type)
- add deprecation warning for SSLCertificateChainFile

ssl_engine_init.c
- configure server certs/keys in ssl_init_server_certs (no longer via
  ssl_pphrase_Handle in ssl_init_Module)
- in ssl_init_server_certs, read in certificates and keys with standard
  OpenSSL API functions (SSL_CTX_use_*_file), and only fall back to
  ssl_load_encrypted_pkey when encountering an encrypted private key
- drop ssl_server_import_cert, ssl_server_import_key, ssl_init_server_check,
  and ssl_init_ctx_cleanup_server
- move the "problematic re-initialization" check to ssl_init_server_ctx

ssl_engine_pphrase.c
- use servername:port:index as the key identifier, instead of the
  previously used servername:port:algorithm
- ssl_pphrase_Handle overhaul: remove all cert/public-key handling,
  make it only load a single (encrypted) private key, and rename
  to ssl_load_encrypted_pkey
- in the passphrase prompt message, show the private key file name
  instead of the vhost id and the algorithm name
- do no longer supply the algorithm name as an argument to "exec"-type
  passphrase prompting programs

ssl_util.c
- drop ssl_util_algotypeof, ssl_util_algotypestr, ssl_asn1_keystr,
  and ssl_asn1_table_keyfmt

ssl_util_ssl.{c,h}
- drop SSL_read_X509
- constify the filename arg for SSL_read_PrivateKey


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1553824 13f79535-47bb-0310-9956-ffa450edef68
2013-12-28 13:24:17 +00:00
Jan Kaluža
bdad52f9e2 mod_ssl: Add -t -DDUMP_CA_CERTS option which dumps the filenames of all
configured SSL CA certificates to stdout the same way as DUMP_CERTS does.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1550060 13f79535-47bb-0310-9956-ffa450edef68
2013-12-11 07:16:28 +00:00
Kaspar Brand
5289285387 Tweaks for SSLOpenSSLConfCmd:
- use cfgMergeArray, and reduce the size of the initial array
- move SSL_CONF_cmd calls from ssl_init_ctx_protocol to
  ssl_init_server_ctx (so they are applied after ssl_init_server_certs)
- add APLOG_DEBUG-level logging for the SSL_CONF_cmd success case
- call SSL_CONF_CTX_free(cctx) when done in ssl_init_server_ctx


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546693 13f79535-47bb-0310-9956-ffa450edef68
2013-11-30 07:44:27 +00:00
Kaspar Brand
e7dc6dd3f4 Remove SSLPKCS7CertificateFile support:
- was never documented, so very unlikely that it was ever used

- adds complexity without apparent benefit; PKCS#7 files can
  be trivially converted to a file for use with SSLCertificateChainFile
  (concatenated X509 CERTIFICATE chunks, openssl pkcs7 -print_certs...)

- only supports PKCS7 files with PEM encoding, i.e. relies on a
  non-standardized PEM header (cf. RFC 2315 and draft-josefsson-pkix-textual)

- issues pointed out in http://mail-archives.apache.org/mod_mbox/httpd-dev/200607.mbox/%3C20060723093125.GA19423@redhat.com%3E
  were never fully addressed (cf. r424707 and r424735)

- has never worked in vhost context due to a cfgMergeString
  call missing from modssl_ctx_cfg_merge


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1544784 13f79535-47bb-0310-9956-ffa450edef68
2013-11-23 13:03:25 +00:00
Joe Orton
ba43a875fd For better compatibility with mod_nss:
* modules/ssl/ssl_engine_config.c (ssl_config_server_new): Default
  sc->enabled to UNSET.

* modules/ssl/ssl_engine_init.c (ssl_init_Module): Only override
  sc->enabled based on the protocol iff sc->enabled is UNSET; allows
  "SSLEngine off" to override the Listen-based default.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1537535 13f79535-47bb-0310-9956-ffa450edef68
2013-10-31 15:42:08 +00:00
Stephen Henson
049b1d249d SSL_CONF support for files and directories.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1534754 13f79535-47bb-0310-9956-ffa450edef68
2013-10-22 19:55:43 +00:00
Kaspar Brand
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
Kaspar Brand
056e10bb4f Follow-up fixes for r1526168:
- drop SSL_TMP_KEY_* constants from ssl_private.h, too

- make sure we also disable aNULL, eNULL and EXP ciphers
  for per-directory SSLCipherSuite directives

- apply the same treatment to SSLProxyCipherSuite


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527291 13f79535-47bb-0310-9956-ffa450edef68
2013-09-29 09:36:31 +00:00
Kaspar Brand
a6a324f9bb Streamline ephemeral key handling:
- drop support for ephemeral RSA keys (only allowed/needed
  for export ciphers)

- drop pTmpKeys from the per-process SSLModConfigRec, and remove
  the temp key generation at startup (unnecessary for DHE/ECDHE)

- unconditionally disable null and export-grade ciphers by always
  prepending "!aNULL:!eNULL:!EXP:" to any cipher suite string

- do not configure per-connection SSL_tmp_*_callbacks, as it is
  sufficient to set them for the SSL_CTX

- set default curve for ECDHE at startup, obviating the need
  for a per-handshake callback, for the time being (and also
  configure SSL_OP_SINGLE_ECDH_USE, previously left out)

For additional background, see
https://mail-archives.apache.org/mod_mbox/httpd-dev/201309.mbox/%3C52358ED1.2070704@velox.ch%3E


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1526168 13f79535-47bb-0310-9956-ffa450edef68
2013-09-25 12:52:35 +00:00
Christophe Jaillet
b663bd4a01 Add a warning if protocol given in SSLProtocol or SSLProxyProtocol will override other parameters given in the same directive.
This could be a missing + or - prefix.

PR 52820

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1520445 13f79535-47bb-0310-9956-ffa450edef68
2013-09-05 22:30:59 +00:00
Jeff Trawick
0d7c9111b3 fix broken indentation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1510588 13f79535-47bb-0310-9956-ffa450edef68
2013-08-05 16:17:37 +00:00
Kaspar Brand
1c780f18be revert r1352596, for the reasons explained in
https://mail-archives.apache.org/mod_mbox/httpd-dev/201304.mbox/%3C515FED7C.5010009%40velox.ch%3E


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1468131 13f79535-47bb-0310-9956-ffa450edef68
2013-04-15 15:56:07 +00:00
Kaspar Brand
50eb694c34 mod_ssl: add support for subjectAltName-based host name checking in proxy mode
(PR 54030)

factor out code from ssl_engine_init.c:ssl_check_public_cert()
to ssl_util_ssl.c:SSL_X509_match_name()

introduce new SSLProxyCheckPeerName directive, which should eventually
obsolete SSLProxyCheckPeerCN

ssl_engine_io.c:ssl_io_filter_handshake(): avoid code duplication
when aborting with HTTP_BAD_GATEWAY


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425874 13f79535-47bb-0310-9956-ffa450edef68
2012-12-26 10:54:54 +00:00
Stephen Henson
2f58146bae Add support for OpenSSL configuration commands.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421323 13f79535-47bb-0310-9956-ffa450edef68
2012-12-13 14:52:47 +00:00
Ben Laurie
d79a70a76a RFC 5878 support.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1352596 13f79535-47bb-0310-9956-ffa450edef68
2012-06-21 16:17:41 +00:00
Stefan Fritsch
88d5d9dbb2 If OPENSSL_NO_COMP is defined, omit merging the compression flag.
Also make some code more compact, as suggested by kbrand.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1348656 13f79535-47bb-0310-9956-ffa450edef68
2012-06-10 20:21:38 +00:00
Stefan Fritsch
ccf77a856a Add support for TLS-SRP (Secure Remote Password key exchange
for TLS, RFC 5054).

PR: 51075
Submitted by: Quinn Slack <sqs cs stanford edu>, Christophe Renou,
              Peter Sylvester


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1347980 13f79535-47bb-0310-9956-ffa450edef68
2012-06-08 09:38:44 +00:00