Commit Graph

41 Commits

Author SHA1 Message Date
507e66cc67 Merge r1526168, r1527291, r1527294, r1527295, r1527926 from trunk:
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


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


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


Improve ephemeral key handling (companion to r1526168):

- allow to configure custom DHE or ECDHE parameters via the
  SSLCertificateFile directive, and adapt its documentation
  accordingly (addresses PR 49559)

- add standardized DH parameters from RFCs 2409 and 3526,
  use them based on the length of the certificate's RSA/DSA key,
  and add a FAQ entry for clients which limit DH support
  to 1024 bits (such as Java 7 and earlier)

- move ssl_dh_GetParamFromFile() from ssl_engine_dh.c to
  ssl_util_ssl.c, and add ssl_ec_GetParamFromFile()

- drop ssl_engine_dh.c from mod_ssl

For the standardized DH parameters, OpenSSL version 0.9.8a
or later is required, which was therefore made a new minimum
requirement in r1527294.


PR 55616 (add missing APLOGNO), part 2
Submitted by: kbrand
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1542327 13f79535-47bb-0310-9956-ffa450edef68
2013-11-15 17:06:18 +00:00
32bf896e8f backport r1385216, r1387610 from trunk:
Spin off module-specific build options into separate build vars.
[second try, supersedes r1385214]

Add MOD_CFLAGS, MOD_LDFLAGS variables etc. to the build commands,
which are available to modules for customization on a per-subdir
basis (by adding definitions to modules.mk). Reduces the risk
of side-effects when a module needs to add CFLAGS, LDFLAGS etc.
and these would be added to the global settings (ALL_CFLAGS etc.).

Adapt build settings for mod_ssl, mod_socache_dc, mod_deflate,
mod_xml2enc, mod_proxy_html, and mod_lua to use the new MOD_xxx
build variables.

Change PICFLAGS, SHLTCFLAGS and LTCFLAGS into config vars, instead
of AC_SUBSTing them in build/rules.mk.in. For support/ab, introduce
ab_CFLAGS and ab_LDFLAGS, and define explicit make targets where
they appear at the proper position in the build commands.

Consistently use "--with-xxx=PATH" in configure help strings which
are used to specify a path to the installation directory of an
auxiliary package.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1390518 13f79535-47bb-0310-9956-ffa450edef68
2012-09-26 14:30:31 +00:00
2453c22a1a Enforce OpenSSL 0.9.7 as a minimum requirement in configure, and
remove #ifdef'ed code which was relevant for earlier versions only.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1154688 13f79535-47bb-0310-9956-ffa450edef68
2011-08-07 10:36:57 +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
5dd473c6d4 enable mod_ssl at level 'most'
Let's assume that if a system has the openssl dev headers installed in
the default location, it is very unlikely that crypto is forbidden in
the country that the system is located in.

If no ssl toolkit is found, disable mod_ssl instead of aborting.

The actual change is small, use 'diff -b' to review


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1150471 13f79535-47bb-0310-9956-ffa450edef68
2011-07-24 19:06:59 +00:00
a68daf2a82 Allow to specify module specific custom linker flags
via the MOD_XXX_LDADD variables.

Use APR_ADDTO instead of APR_SETVAR or direct
variable assignment.

This is especially useful when building mod_lua
or mod_deflate against a lua resp. libz which
are installed in non-standard locations.
One can add "-R ..." to MOD_LUA_LDADD and
MOD_DEFLATE_LDADD before configure to fix
the RPATH/RUNPATH of those modules.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142938 13f79535-47bb-0310-9956-ffa450edef68
2011-07-05 09:24:23 +00:00
35cdba6976 Replace ap_expr with a parser derived from mod_ssl's parser. Make mod_ssl use
the new parser. Rework ap_expr's public interface and provide hooks for modules
to add variables and functions.

The Netware and Windows build files still need to be adjusted


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032073 13f79535-47bb-0310-9956-ffa450edef68
2010-11-06 14:31:16 +00:00
b2cb650f61 Add support for OCSP "stapling":
* modules/ssl/ssl_util_stapling.c: New file.

* modules/ssl/config.m4, modules/ssl/mod_ssl.dsp: Build it.

* modules/ssl/ssl_toolkit_compat.h: Define HAVE_OCSP_STAPLING if
  OpenSSL is of suitable version (>= 0.9.8g) and capability (TLS
  extension support enabled).

* modules/ssl/mod_ssl.c: Add config directives.

* modules/ssl/ssl_private.h: Add prototypes for new functions.
  (SSLModConfigRec): Add fields for stapling socache instance and
  associated mutex.
  (modssl_ctx_t): Add config fields for stapling.

* modules/ssl/ssl_engine_init.c (ssl_init_Module, ssl_init_Child):
  Call the stapling initialization functions.

* modules/ssl/ssl_engine_config.c: Add config hooks.

* modules/ssl/ssl_scache.c: Create, initialize and destroy the socache
  instance for OCSP responses.

Submitted by: Dr Stephen Henson <shenson oss-institute.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@829619 13f79535-47bb-0310-9956-ffa450edef68
2009-10-25 17:21:10 +00:00
759da80c79 Session cache interface redesign, Part 9:
Switch mod_ssl to use the ap_socache interface.

* modules/ssl/ssl_scache_shmcb.c, modules/ssl/ssl_scache_memcache.c,
  modules/ssl/ssl_scache_dc.c, modules/ssl/ssl_scache_dbm.c: Remove
  files.

* modules/ssl/mod_ssl.c (modssl_register_scache): Remove function.

* modules/ssl/ssl_private.h: Remove modssl_sesscache_provider etc.
  (SSLModConfigRec): Switch to using socache types.

* modules/ssl/ssl_engine_config.c (ssl_cmd_SSLSessionCache): Switch to
  use socache provider.

* modules/ssl/ssl_engine_mutex.c, modules/ssl/ssl_scache.c: Switch to
  using socache constants.

* modules/ssl/config.m4: Drop distache/memcache configuration, remove
  old objects.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645940 13f79535-47bb-0310-9956-ffa450edef68
2008-04-08 14:21:24 +00:00
33c045efb2 mod_ssl: Add support for OCSP validation of client certificates:
* modules/ssl/ssl_engine_config.c (modssl_ctx_init,
  modssl_ctx_cfg_merge): Initialize and merge OCSP config options.
  (ssl_cmd_SSLOCSPOverrideResponder, ssl_cmd_SSLOCSPDefaultResponder,
  ssl_cmd_SSLOCSPEnable): Add functions.

* modules/ssl/mod_ssl.c (ssl_config_cmds): Add config options.

* modules/ssl/ssl_private.h: Add prototypes, config options to
  modssl_ctx_t.

* modules/ssl/ssl_util_ocsp.c: New file, utility interface for
  dispatching OCSP requests.

* modules/ssl/ssl_engine_ocsp.c: New file, interface for performing
  OCSP validation.

* modules/ssl/ssl_engine_kernel.c (ssl_callback_SSLVerify): Perform
  OCSP validation if configured, and the cert is so-far verified to be
  trusted.  Fail if OCSP validation is configured an the optional-no-ca 
  check tripped.

* modules/ssl/config.m4: Check for OCSP support, build new files.

* modules/ssl/mod_ssl.dsp: Build new files.

* modules/ssl/ssl_toolkit_compat.h: Include headers for OCSP
  interfaces.

PR: 41123
Submitted by: Marc Stern <marc.stern approach.be>, Joe Orton
Reviewed by: Steve Henson <steve openssl.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@599385 13f79535-47bb-0310-9956-ffa450edef68
2007-11-29 11:18:40 +00:00
f8b84a19ac Remove unneeded -I in apr_memcache test, since _INCLUDES already includes them on the paths
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@555463 13f79535-47bb-0310-9956-ffa450edef68
2007-07-12 02:20:53 +00:00
bcfcc8509a Fix VPATH builds of httpd with the apr_memcache backend for ssl sessions, when APR and APR-Util are also in a VPATH. This is caused by APR_INCLUDEDIR actually having multiple paths in a VPATH builds, so we need to use _INCLUDES instead.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@555458 13f79535-47bb-0310-9956-ffa450edef68
2007-07-12 02:06:01 +00:00
1b7a5c2566 Add support for distributed caching of SSL Sessions inside memcached, using apr_memcache, which is present in APR-Util 1.3/trunk.
This was originally written at ApacheCon US 2005 (San Diego), and was sent to the list:
http://mail-archives.apache.org/mod_mbox/httpd-dev/200512.mbox/%3C439C6C07.9030904@force-elite.com%3E

This version is slightly cleaned up, and of course, uses the now bundled apr_memcache, rather than an external dependency.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@545379 13f79535-47bb-0310-9956-ffa450edef68
2007-06-08 02:48:04 +00:00
70d52262ee update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@421021 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 23:07:06 +00:00
8543206431 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@421020 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 23:04:56 +00:00
ebe24d48c7 Update the last year of copyright.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395229 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:23:42 +00:00
9687f8c6a7 Update remaining 2004 copyright notices.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@190592 13f79535-47bb-0310-9956-ffa450edef68
2005-06-14 13:54:34 +00:00
4ada6c2966 * modules/ssl/config.m4: Use libtool's -export-symbols-regex flag to
hide all global symbols defined by mod_ssl other than the module
structure (where possible).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105740 13f79535-47bb-0310-9956-ffa450edef68
2004-11-10 15:11:23 +00:00
15e2a44274 Fix use of mod_ssl as a DSO linked against static SSL libraries; also
stop linking all of support/* against the SSL libraries:

* acinclude.m4 (APACHE_MODULE): Define MOD_FOO_LDADD which each
module .la library will be linked against.
(APACHE_MODPATH_ADD): Link static modules against the provided libraries.
(APACHE_CHECK_SSL_TOOLKIT): Put SSL libraries in SSL_LIBS and export
that to config_vars.mk.

* support/Makefile.in: Link ab against SSL_LIBS.

* modules/ssl/config.m4: Add SSL_LIBS and distcache libraries to
MOD_SSL_LDADD.

PR: 17217


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102870 13f79535-47bb-0310-9956-ffa450edef68
2004-03-06 16:47:41 +00:00
3ca3524c31 Move mod_ssl-internal interfaces into ssl_private.h; allow mod_ssl.h
to be included even when mod_ssl is not enabled.

* Makefile.in (install-include): Only install mod_ssl.h.

* modules/ssl/ssl_private.h: New file.

* modules/ssl/mod_ssl.h: Move everything apart from than the optional
hook definitions into ssl_private.h.

* modules/ssl/*.c: Include ssl_private.h not mod_ssl.h

* modules/ssl/config.m4: Always add the mod_ssl directory to the
include path so other modules can find mod_ssl.h.

* modules/proxy/mod_proxy.c: Include mod_ssl.h to pick up the optional
hook definitions rather than copy'n'pasting them.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102803 13f79535-47bb-0310-9956-ffa450edef68
2004-02-28 18:06:35 +00:00
3b3113012f Relicense.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102799 13f79535-47bb-0310-9956-ffa450edef68
2004-02-28 11:55:46 +00:00
a91a2e172b We need the SSL module dir in our path in order to compile mod_ssl.
Otherwise, we can't find mod_ssl.h.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102515 13f79535-47bb-0310-9956-ffa450edef68
2004-02-05 17:54:30 +00:00
3c52d23027 Add support to mod_ssl for a distributed session cache using
distcache.

* LAYOUT: Update for removal of scache_shmht and addition of scache_dc.

* modules/ssl/config.m4: Check for libdistcache; build ssl_scache_dc.lo.

* modules/ssl/mod_ssl.dsp: Build ssl_scache_dc (with luck).

* modules/ssl/mod_ssl.h: Add SSL_SCMODE_DC and scache_dc_* prototypes.

* modules/ssl/ssl_engine_config.c (ssl_cmd_SSLSessionCache): Allow
use of dc: argument.

* modules/ssl/ssl_scache_dc.c: New file.

* modules/ssl/ssl_scache.c (ssl_scache_init, ssl_scache_kill,
ssl_scache_store, ssl_scache_retrieve, ssl_scache_remove,
ssl_ext_status_hook): Hook into scache_dc.

Submitted by: Geoff Thorpe <geoff@geoffthorpe.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102227 13f79535-47bb-0310-9956-ffa450edef68
2004-01-08 16:26:53 +00:00
9ddbb80f51 Remove shmht session cache in favour of shmcb; shmht has had
data corruption bugs since being apr_rmm'ified.

* config.m4, mod_ssl.dsp: Don't build ssl_util_table and
ssl_scache_shmht.

* ssl_util_table.h, ssl_util_table.c, ssl_scache_shmht.c: Removed
files.

* mod_ssl.h (SSLModConfigRec): Use a void * pointer for storing
the scache-specific data.

* ssl_engine_config.c (ssl_cmd_SSLSessionCache): Treat shmht: as
shmcb:.

* ssl_scache.c: Remove shmht hooks throughout.

* ssl_scache_shmcb.c: Remove casts to use the table_t * pointer as a
void *.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101888 13f79535-47bb-0310-9956-ffa450edef68
2003-11-25 15:46:37 +00:00
b36a32b59a These tests now exist in acinclude.m4
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100041 13f79535-47bb-0310-9956-ffa450edef68
2003-05-27 19:28:39 +00:00
26f1ba8050 The patch below reverts the prior commit to eliminate SSL_set_state().
Some additional work or research is required in order to pass the
  perl-framework regressions, but I don't have the cycles and don't
  care to leave the broken code in cvs HEAD.

REVERTING: wrowe 2003/05/19 08:13:19

  Modified:    modules/ssl config.m4 ssl_engine_io.c ssl_engine_kernel.c
                        ssl_toolkit_compat.h
  Log:
    Drop SSL_set_state() in favor of a proper SSL_renegotiate() to begin
    rehandshaking the SSL connection, vis-a-vis ApacheSSL.

  Revision  Changes    Path
  1.15      +0 -1      httpd-2.0/modules/ssl/config.m4
  1.108     +1 -1      httpd-2.0/modules/ssl/ssl_engine_io.c
  1.93      +1 -1      httpd-2.0/modules/ssl/ssl_engine_kernel.c
  1.34      +0 -6      httpd-2.0/modules/ssl/ssl_toolkit_compat.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100004 13f79535-47bb-0310-9956-ffa450edef68
2003-05-22 19:41:32 +00:00
1a6f1ae739 Drop SSL_set_state() in favor of a proper SSL_renegotiate() to begin
rehandshaking the SSL connection, vis-a-vis ApacheSSL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99921 13f79535-47bb-0310-9956-ffa450edef68
2003-05-19 15:13:19 +00:00
a5708f15e6 Roll away the SSL_EXPERIMENTAL_ENGINE test in favor of testing for the
ENGINE_init() function in config.m4, and rely on HAVE_ENGINE_INIT instead.

Reviewed by: Ben Laurie (concept)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99919 13f79535-47bb-0310-9956-ffa450edef68
2003-05-19 14:48:47 +00:00
aab043443e First point out that we lost HAVE_SSL_SET_STATE and HAVE_SSL_SET_CERT_STORE
autoconf discovery.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99918 13f79535-47bb-0310-9956-ffa450edef68
2003-05-19 14:43:20 +00:00
434aab19d0 Replace the APACHE_CHECK_SSL_TOOLKIT method with a cleaner one, using
autoconf tools (AC_CHECK_HEADER, AC_CHECK_LIB etc).

Submitted by: Geoff Thorpe <geoff@geoffthorpe.net>
Reviewed by: Madhu, Justin


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98999 13f79535-47bb-0310-9956-ffa450edef68
2003-03-13 20:36:39 +00:00
1d739333a1 removing old proxy extension code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94301 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 07:36:01 +00:00
aeb7f9eb0b add configure checks for ssl functions:
-SSL_set_state: macro in OpenSSL, might be a function in a patched sslc
-SSL_set_cert_store: patch submitted to OpenSSL, might be applied to
OpenSSL or sslc


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94223 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 17:02:56 +00:00
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
cc61103ca6 remove obsolete ssl_ds_{table,array} api
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93891 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 04:14:43 +00:00
a4cd98f6e6 Turns out this is causing problems on my linux box (libtool 1.3.5), so
I'm going to remove it until I or someone else can come up with a better
way to check for and link against libssl and libcrypto for mod_ssl.so.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91950 13f79535-47bb-0310-9956-ffa450edef68
2001-11-14 18:56:18 +00:00
525ee8feac Gets mod_ssl building/loading as a DSO on some platforms (like HPUX).
Submitted by:	Madhu Mathihalli <madhusudan_mathihalli@hp.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91791 13f79535-47bb-0310-9956-ffa450edef68
2001-11-07 19:42:07 +00:00
ba518019b5 Eventually we will want to only find openssl once regardless of how
many modules depend on it, so make the check an autoconf macro.
Note that this still isn't being checked "the autoconf way", but it
is better than what we have now.

I'm not sure about the -R stuff, but I am told that Solaris won't
build without it.  This is something that should be tested using
AC_TRY_LINK rather than assuming openssl isn't already on the ld path.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89063 13f79535-47bb-0310-9956-ffa450edef68
2001-05-10 01:47:47 +00:00
61084bf9ce When no specific location of openssl is given, we need to check the
places where people install upgraded software first, since otherwise
we will get the older versions installed by the OS distribution.  That's
very bad for us because we are requiring a version of openssl that is
more recent than most of the Linux distros.

When finding the openssl helper program, check both the PATH and the default
install dirs, since openssl isn't normally included on a user's path.

Use APR_ADDTO to add to the make macros in order to avoid duplicates.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89053 13f79535-47bb-0310-9956-ffa450edef68
2001-05-08 04:42:26 +00:00
507c1de06c remove remaining references to compat and sdbm
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89015 13f79535-47bb-0310-9956-ffa450edef68
2001-05-05 15:32:46 +00:00
f176ba44b1 Next step in mod_ssl integration:
Add missing files to build environment.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89006 13f79535-47bb-0310-9956-ffa450edef68
2001-05-05 10:12:08 +00:00
680f9c0157 Integrate mod_ssl into the Autoconf facility.
(currently only stub files are compiled)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89002 13f79535-47bb-0310-9956-ffa450edef68
2001-05-05 09:25:52 +00:00