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
Stefan Fritsch
510d3f904e Add new directive SSLCompression to disable SSL-level compression.
PR: 53219
Submitted by: Björn Jacke <bjoern j3e de>, Stefan Fritsch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1345319 13f79535-47bb-0310-9956-ffa450edef68
2012-06-01 19:36:37 +00:00
Kaspar Brand
b020069af4 add missing #ifdef in ssl_cmd_protocol_parse (should have been in r1222921)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1222930 13f79535-47bb-0310-9956-ffa450edef68
2011-12-24 07:31:50 +00:00
Kaspar Brand
1af61dfb2e SSLProtocol: allow explicit control of TLSv1.1 and TLSv1.2 flavors when
compiled against OpenSSL 1.0.1 or later. Update documentation.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1222921 13f79535-47bb-0310-9956-ffa450edef68
2011-12-24 06:40:10 +00:00
Kaspar Brand
8d37f73ce7 Streamline TLS session ticket key handling (added in r1200040):
- drop the SSLTicketKeyDefault directive, and only support a single
  ticket key per server/vhost
- rename the SSLTicketKeyFile directive to SSLSessionTicketKeyFile,
  remove the keyname parameter
- move ticket key parameters from SSLSrvConfigRec to modssl_ctx_t
- configure the tlsext_ticket_key_cb only when in server mode
- add documentation for SSLSessionTicketKeyFile


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1213380 13f79535-47bb-0310-9956-ffa450edef68
2011-12-12 19:21:35 +00:00
Stefan Fritsch
9b79361d79 More pointers to mod_socache*
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1210130 13f79535-47bb-0310-9956-ffa450edef68
2011-12-04 16:05:28 +00:00
Stefan Fritsch
c5d691aa03 Point to mod_socache_* in the SSLSessionCache error message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1210080 13f79535-47bb-0310-9956-ffa450edef68
2011-12-04 09:05:07 +00:00
Kaspar Brand
304e9c4c08 drop SSLv2 support (set SSL_OP_NO_SSLv2 for any new SSL_CTX)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1203491 13f79535-47bb-0310-9956-ffa450edef68
2011-11-18 05:27:00 +00:00
Paul Querna
c44e61902f Apply ap_server_root_relative to the path used for the ticket secrets file.
Suggested by: Rüdiger Plüm


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200372 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 15:17:18 +00:00
Paul Querna
4935d31e45 Whitespace fixes for r1200040
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200045 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 23:44:53 +00:00
Paul Querna
8b2e0e56c2 Add support for RFC 5077 TLS Session tickets. This adds two new directives:
* SSLTicketKeyFile: To store the private information for the encryption of the ticket.
* SSLTicketKeyDefault To set the default, otherwise the first listed token is used.  This enables key rotation across servers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200040 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 23:37:37 +00:00
Stefan Fritsch
0ddfb3e6cc Add -D DUMP_RUN_CFG option to dump some configuration items
from the parsed (or default) config. This is useful for init scripts that
need to setup temporary directories and permissions, for example if those
temporary directories are located on a ram disk.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180681 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 18:35:23 +00:00
Stefan Fritsch
cd17cd2c10 Consistenly use apr_file_* API instead of libc when dumping config because
mixing the two can give strange results due to buffering.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180671 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 17:55:06 +00:00
Stefan Fritsch
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
Jim Jagielski
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
Kaspar Brand
6411f1dc04 Bring error messages for TLS stapling related options in sync
with their directive names.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1173772 13f79535-47bb-0310-9956-ffa450edef68
2011-09-21 17:32:20 +00:00
Ruediger Pluem
e166fc0b9b * Fix compiler warning by removing unused variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1165198 13f79535-47bb-0310-9956-ffa450edef68
2011-09-05 08:13:47 +00:00
Kaspar Brand
2c24630059 Revamp CRL checking for client and remote servers:
- completely delegate CRL processing to OpenSSL
- introduce a new [Proxy]CARevocationCheck directive
- drop ssl_callback_SSLVerify_CRL from ssl_engine_kernel.c
- remove X509_STORE from modssl_ctx_t
- drop CRL store helper functions from ssl_util_ssl.c
- avoid sending "certificate_expired" SSL alerts to peers
  when the nextUpdate field of a CRL is in the past


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1165056 13f79535-47bb-0310-9956-ffa450edef68
2011-09-04 15:57:03 +00:00
Ruediger Pluem
f953d427f3 * Add missing ;
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1161002 13f79535-47bb-0310-9956-ffa450edef68
2011-08-24 08:36:39 +00:00
Daniel Ruggeri
e5df36d18a Add SSLProxyMachineCertificateChainFile directive and documentation for bug 50812
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1160863 13f79535-47bb-0310-9956-ffa450edef68
2011-08-23 19:35:07 +00:00
Joe Orton
4e858e3859 * modules/ssl/ssl_engine_config.c (ssl_cmd_SSLCryptoDevice): Fix
double-free (and segfault) with bad arg to SSLCryptoDevice.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157105 13f79535-47bb-0310-9956-ffa450edef68
2011-08-12 13:40:09 +00:00
Kaspar Brand
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
Stefan Fritsch
46d4791a5d Add string valued expressions to ap_expr, do some API cleanup
- add possibility to have expressions that evaluate to a string and not to
  a boolean value
- modify ap_expr_parse_cmd() interface to support this and make it more
  convenient to use in general
- rename AP_EXPR_FLAGS_* to AP_EXPR_FLAG_* for consistency


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142164 13f79535-47bb-0310-9956-ffa450edef68
2011-07-02 07:45:00 +00:00
Stefan Fritsch
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
Joe Orton
271de81e7c * modules/ssl/ssl_engine_config.c, modules/ssl/ssl_private.h: Add
config hooks for OCSP response time skew, maximum age, timeout.

* modules/ssl/ssl_engine_ocsp.c (verify_ocsp_status): Respect
  config settings for above.

* docs/: Update accordingly.

Submitted by: Kaspar Brand <httpd-dev.2011 velox.ch>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1059917 13f79535-47bb-0310-9956-ffa450edef68
2011-01-17 13:27:03 +00:00
Stefan Fritsch
7403827278 Change the format of the SSL_{CLIENT,SERVER}_{I,S}_DN variables
to be RFC 2253 compatible, convert non-ASCII characters to UTF8, and 
escape other special characters with backslashes. The old format can
still be used with the LegacyDNStringFormat argument to SSLOptions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1054323 13f79535-47bb-0310-9956-ffa450edef68
2011-01-01 23:56:24 +00:00
Stefan Fritsch
c40fa87ce7 Log errors/infos during expression evaluation and associate the message
with the module that is calling ap_expr_exec()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037140 13f79535-47bb-0310-9956-ffa450edef68
2010-11-20 08:59:50 +00:00
Stefan Fritsch
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
Stefan Fritsch
8afd97db5f Add authz providers for use with mod_authz_core and its RequireAny/RequireAll
containers:

'ssl' (equivalent to SSLRequireSSL)
'ssl-verify-client' (for use with 'SSLVerifyClient optional')
'ssl-require' (expressions with same syntax as SSLRequire)

We may decide to axe 'ssl-require' again in favor of the generic 'expr'
provider, depending on the development of the ap_expr parser.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1002837 13f79535-47bb-0310-9956-ffa450edef68
2010-09-29 20:32:23 +00:00
Stefan Fritsch
f9ba292bfa Make the ssl expression parser thread-safe. It now requires bison instead of
yacc.

Also change the make file magic so that the real source file name is
embedded in the debug info.

The generated files have been created with flex 2.5.35/bison 2.4.1. The two
'no previous prototype' warnings are supposed to be fixed with the next flex
version.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1002824 13f79535-47bb-0310-9956-ffa450edef68
2010-09-29 19:42:03 +00:00
Stefan Fritsch
affc4cf328 save some memory by using cmd->temp_pool instead of cmd->pool in some places
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1002156 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 13:19:33 +00:00
Stefan Fritsch
6da4e2a55b Fix some compiler warnings:
- suggest braces around empty body in an 'if' statement
- comparison of unsigned expression >= 0 is always true
- comparison of unsigned expression < 0 is always false

Please review carefully.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@954641 13f79535-47bb-0310-9956-ffa450edef68
2010-06-14 20:55:59 +00:00
Stefan Fritsch
ba0d30294e Replace LogLevelDebugDump with TRACE log levels
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951904 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 17:10:23 +00:00
Ruediger Pluem
dff71ed506 * Silence compiler warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@926619 13f79535-47bb-0310-9956-ffa450edef68
2010-03-23 15:28:57 +00:00
William A. Rowe Jr
f78ddd0f6c Fix BOOL fips handling for UNSET values, and hack a vc compiler warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@926000 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 08:47:26 +00:00
William A. Rowe Jr
7eb4e714ae Introduce SSLFIPS directive to support OpenSSL FIPS_mode; permits all
builds of mod_ssl to use 'SSLFIPS off' for portability, but the proper
build of openssl is required for 'SSLFIPS on'.  

PR: 46270  
Submitted by: Dr Stephen Henson <steve openssl.org>, wrowe



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@925980 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 06:53:41 +00:00
Joe Orton
4ed50e1c9a * modules/ssl/ssl_engine_config.c (ssl_cmd_SSLInsecureRenegotiation):
Tweak wording as suggested by trawick.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@916817 13f79535-47bb-0310-9956-ffa450edef68
2010-02-26 21:13:26 +00:00
Joe Orton
2f5fadb801 * modules/ssl/ssl_engine_config.c (ssl_cmd_SSLInsecureRenegotiation):
Tweak error wording for when the directive is not supported.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@908015 13f79535-47bb-0310-9956-ffa450edef68
2010-02-09 12:46:17 +00:00
Joe Orton
f1e767fd68 New releases of OpenSSL will only allow secure renegotiation by
default.  Add an "SSLInsecureRenegotiation" directive to enable
renegotiation against unpatched clients, to ease transition:

* modules/ssl/ssl_private.h (struct SSLSrvConfigRec): Add
  insecure_reneg field.

* modules/ssl/ssl_engine_config.c (ssl_config_server_new,
  ssl_config_server_merge): Handle the insecure_reneg flag.
  (ssl_cmd_SSLInsecureRenegotiation): New function.

* modules/ssl/ssl_engine_init.c (ssl_init_ctx_protocol): Set the
  SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION option if insecure_reneg is
  enabled.

* modules/ssl/ssl_engine_kernel.c (ssl_hook_Access): Log level of
  support for secure reneg.

* modules/ssl/mod_ssl.c: Add the directive definition.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@906039 13f79535-47bb-0310-9956-ffa450edef68
2010-02-03 13:38:09 +00:00
Jeff Trawick
2e9668a33d Replace AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex,
and WatchdogMutexPath with a single Mutex directive.  Add APIs to
simplify setup and user customization of APR proc and global mutexes.  
(See util_mutex.h.)  Build-time setting DEFAULT_LOCKFILE is no longer
respected; set DEFAULT_REL_RUNTIMEDIR instead.

Some existing modules, such as mod_ldap and mod_auth_digest gain 
configurability for their mutexes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@883540 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 23:17:51 +00:00
Joe Orton
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
Ruediger Pluem
8627001684 * As proposed by wrowe on list always define SSLStrictSNIVHostCheck, but error
out if we are not compiled against an SNI capable OpenSSL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@770907 13f79535-47bb-0310-9956-ffa450edef68
2009-05-02 07:47:59 +00:00
Ruediger Pluem
80ccfe3613 * Add SSLStrictSNIVHostCheck to allow / disallow non SNI clients to connect to
name based virtual hosts.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@768596 13f79535-47bb-0310-9956-ffa450edef68
2009-04-25 20:15:49 +00:00
Ruediger Pluem
e468a9fae6 * Add SSLProxyCheckPeerExpire and SSLProxyCheckPeerCN directives to enable
stricter checking of remote server certificates.

  (docs/manual/mod/mod_ssl.xml)
    Documentation of SSLProxyCheckPeerExpire and SSLProxyCheckPeerCN.

  (modules/proxy/mod_proxy_http.c)
    Set the hostname of the request URL as note on the connection.

  (modules/ssl/ssl_private.h)
    Add proxy_ssl_check_peer_expire and proxy_ssl_check_peer_cn fields to
    the SSLSrvConfigRec.

  (modules/ssl/ssl_engine_config.c)
    Directives stuff for SSLProxyCheckPeerExpire and SSLProxyCheckPeerCN.

  (modules/ssl/ssl_engine_io.c)
    Check whether the remote servers certificate is expired / if there is a
    mismatch between the requested hostanme and the remote server certificates
    CN field.
    Be able to parse ASN1 times.

  (modules/ssl/mod_ssl.c)
    Directives stuff for SSLProxyCheckPeerExpire and SSLProxyCheckPeerCN.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@760866 13f79535-47bb-0310-9956-ffa450edef68
2009-04-01 12:07:47 +00:00
Joe Orton
f67ffe3d58 Remove code to support per-dir-CA configuration which relies on a
function which was never included in OpenSSL:

* acinclude.m4: Remove test for fictional function.

* modules/ssl/ssl_engine_kernel.c (ssl_hook_Access): Remove code.

* modules/ssl/ssl_engine_config.c (MODSSL_SET_CA): Remove unused
  macro.  (ssl_cmd_SSLCACertificatePath,
  ssl_cmd_SSLCACertificateFile): Fail if per-dir-CA is configured.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@757380 13f79535-47bb-0310-9956-ffa450edef68
2009-03-23 11:45:00 +00:00
Ruediger Pluem
0f6f55ba57 * Correctly merge SSLRenegBufferSize directive.
PR: 46508
Submitted by: <tlhackque yahoo.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@733465 13f79535-47bb-0310-9956-ffa450edef68
2009-01-11 12:58:08 +00:00
Joe Orton
b06785833f mod_ssl: Make the size of the per-dir-reneg request-body buffer
configurable, by popular demand:

* modules/ssl/ssl_private.h: Define DEFAULT_RENEG_BUFFER_SIZE.
  (SSLDirConfigRec): Add nRenegBufferSize field.

* modules/ssl/ssl_engine_config.c (ssl_cmd_SSLRenegBufferSize): New
  function.
  (ssl_config_perdir_create, ssl_config_perdir_merge): Handle
  nRenegBufferSize.

* modules/ssl/ssl_engine_io.c (ssl_io_buffer_fill): Take max buffer
  size as an argument rather than compile-time constant.

* modules/ssl/ssl_engine_kernel.c (ssl_hook_Access): Pass
  nRenegBufferSize to ssl_io_buffer_fill.

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

PR: 39243


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726109 13f79535-47bb-0310-9956-ffa450edef68
2008-12-12 20:20:40 +00:00
Joe Orton
e92019fdcb * modules/ssl/ssl_engine_config.c (ssl_cmd_SSLSessionCache): Allow
using socache provider config defaults by omitting the arguments, so
  e.g.  "SSLSessionCache shmcb" or even "SSLSessionCache default"
  should now DTRT.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726034 13f79535-47bb-0310-9956-ffa450edef68
2008-12-12 15:18:21 +00:00
Joe Orton
61d7e254c9 * modules/ssl/ssl_engine_config.c (ssl_cmd_SSLSessionCache): Don't fix
the socache instance for the lifetime of the process since it is
  allocated out of pconf.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724789 13f79535-47bb-0310-9956-ffa450edef68
2008-12-09 17:26:50 +00:00
Jim Jagielski
72e89c84a7 picking nits - de-tab
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@682788 13f79535-47bb-0310-9956-ffa450edef68
2008-08-05 16:52:12 +00:00
Joe Orton
05f32df147 * modules/ssl/ssl_engine_config.c: Remove unused macro.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645941 13f79535-47bb-0310-9956-ffa450edef68
2008-04-08 14:22:47 +00:00