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
fb5cf8f74f If MaxMemFree is set, set SSL_MODE_RELEASE_BUFFERS in mod_ssl.
Always set SSL_MODE_RELEASE_BUFFERS in ab.

PR: 51618
Submitted by: Cristian Rodríguez <crrodriguez opensuse org>, Stefan Fritsch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1178079 13f79535-47bb-0310-9956-ffa450edef68
2011-10-01 19:48:14 +00:00
2160d8594c In ssl_check_public_cert(), also take dNSNames in the subjectAltName
extension into account when checking the cert against the configured
ServerName. PR 32652, PR 47051.

Replace SSL_X509_getCN() by SSL_X509_getIDs(), which returns an array
of a cert's DNS-IDs and CN-IDs (terms as coined by RFC 6125).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1176752 13f79535-47bb-0310-9956-ffa450edef68
2011-09-28 06:52:39 +00:00
c4736a5326 Final update to SSLProxyMachineCertificateChainFile
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1175946 13f79535-47bb-0310-9956-ffa450edef68
2011-09-26 16:39:00 +00:00
8a52dc2610 replace another occurence of X509_NAME_oneline by SSL_X509_NAME_to_string
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1175905 13f79535-47bb-0310-9956-ffa450edef68
2011-09-26 15:24:23 +00:00
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
f1937c9534 Style cleanup
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172562 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 10:48:45 +00:00
362f424e78 Log better information and prevent leak of an X509 structure for SSLProxyMachineCertificateChainFile
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172010 13f79535-47bb-0310-9956-ffa450edef68
2011-09-17 16:25:17 +00:00
47cf15b852 Modify SSLProxyMachineCertificateChainFile to use X509 instead of X509_INFO and use openssl to construct the chain
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1170833 13f79535-47bb-0310-9956-ffa450edef68
2011-09-14 20:16:02 +00:00
b4db4c2cdd * Silence compiler warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1165200 13f79535-47bb-0310-9956-ffa450edef68
2011-09-05 08:23:01 +00:00
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
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
6a6c22af52 Enforce OpenSSL 0.9.7 or later at compile time (#error out otherwise).
Remove some more unneeded defines from ssl_private.h.

At runtime, warn when mod_ssl is started with an OpenSSL version
older than the one it was originally compiled against.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157575 13f79535-47bb-0310-9956-ffa450edef68
2011-08-14 17:37:03 +00:00
7bd59fd67a Remove the ssl_toolkit_compat layer, which is no longer needed
after support for non-OpenSSL toolkits has been dropped.

Replace macros by their value proper where feasible, and keep
those definitions in ssl_private.h which depend on specific
OpenSSL versions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1154687 13f79535-47bb-0310-9956-ffa450edef68
2011-08-07 10:34:31 +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
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
03d6bcb14f Error messages like "theoretically shouldn't happen" are incredibly
unhelpful, particularly when they do happen with some regularity.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031057 13f79535-47bb-0310-9956-ffa450edef68
2010-11-04 16:15:03 +00:00
7b9471c76f handle the ca_list == NULL case correctly (which can only happen with out
of memory, anyway)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1027239 13f79535-47bb-0310-9956-ffa450edef68
2010-10-25 19:13:20 +00:00
59d4757c65 Make sure to always log an error if loading of CA certificates fails
PR: 40312
Submitted by: Paul Tiemann <issues apache org ourdetour com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1026906 13f79535-47bb-0310-9956-ffa450edef68
2010-10-24 22:14:15 +00:00
d658afdd1c Consistently use loglevel emerg before ssl_die()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1026903 13f79535-47bb-0310-9956-ffa450edef68
2010-10-24 21:57:08 +00:00
cdb0073eec Make sure OCSP Stapling Mutex is initiliased if we need it.
PR 49498


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1023821 13f79535-47bb-0310-9956-ffa450edef68
2010-10-18 14:45:19 +00:00
2783b4e8fa Fix stupid typos.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1023533 13f79535-47bb-0310-9956-ffa450edef68
2010-10-17 17:52:38 +00:00
25ff6f51f1 Avoid use of deprecated RSA_generate_key() function.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1023521 13f79535-47bb-0310-9956-ffa450edef68
2010-10-17 16:30:13 +00:00
01b9f2e551 - Be less verbose at levels INFO and DEBUG in mod_proxy* and mod_ssl
- Add some trace logging to core and http


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951900 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 17:07:12 +00:00
7d6bd86673 Introduce SSLLOG_MARK for use with ssl_log_ssl_error(). This will allow to
redefine APLOG_MARK later.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951194 13f79535-47bb-0310-9956-ffa450edef68
2010-06-03 22:57:00 +00:00
cb97d06489 * sc->fips is only defined if we have HAVE_FIPS
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@926614 13f79535-47bb-0310-9956-ffa450edef68
2010-03-23 15:25:40 +00:00
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
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
1d17660c10 fix comment typo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@907880 13f79535-47bb-0310-9956-ffa450edef68
2010-02-09 01:59:59 +00:00
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
4b0455e133 * Use correct #ifndef's to compile again on openssl 0.9.8 and fix compiler
warnings.

Noted by: sf


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@835046 13f79535-47bb-0310-9956-ffa450edef68
2009-11-11 20:27:10 +00:00
b90aee19b9 enable support for ECC keys and ECDH ciphers. Tested against
OpenSSL 1.0.0b3.  [Vipul Gupta vipul.gupta sun.com, Sander Temme]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834378 13f79535-47bb-0310-9956-ffa450edef68
2009-11-10 07:55:13 +00:00
39d5d9507b SECURITY: Partial fix for CVE-2009-3555:
Reject client-initiated renegotiations; this is sufficient to prevent
the attack for any configuration which does not require renegotiation
due to per-directory/per-location access control configuration.

Configuration with per-directory/per-location access control
requirements (such as "SSLVerifyClient require") are still vulnerable
to CVE-2009-3555 with this patch applied (if using OpenSSL <= 0.9.8k).

* modules/ssl/ssl_private.h (SSLConnRec): Add reneg_state field.
  (ssl_callback_Info): Renamed from ssl_callback_LogTracingState.

* modules/ssl/ssl_engine_init.c (ssl_init_ctx_callbacks): Install
  the (renamed) info callback unconditionally.

* modules/ssl/ssl_engine_io.c (ssl_filter_ctx_t): Add config pointer
  to SSLConnRec.
  (bio_filter_out_write, bio_filter_in_read): Fail with
  APR_ECONNABORTED if the reneg state is set to RENEG_ABORT.

* modules/ssl/ssl_engine_kernel.c (log_tracing_state): Factored out
  of ssl_callback_LogTracingState.
  (ssl_callback_Info): New function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@833582 13f79535-47bb-0310-9956-ffa450edef68
2009-11-06 22:33:19 +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
cea543cf79 removed another obsolete cast. Mentioned by Peter Sylvester.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@798989 13f79535-47bb-0310-9956-ffa450edef68
2009-07-29 17:42:49 +00:00
3175d7782f removed obsolete cast. Mentioned by Peter Sylvester.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@798274 13f79535-47bb-0310-9956-ffa450edef68
2009-07-27 20:22:59 +00:00
7d5d67750c Clean up more compiler emits. Add CHANGES entry, credit Kasper for the OpenSSL STACK fix
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@749466 13f79535-47bb-0310-9956-ffa450edef68
2009-03-02 23:17:53 +00:00
e171af3118 The development trunk of OpenSSL has tightened up the type safety of the STACK construct
and the functions that manipulate it.  Make httpd trunk compile against OpenSSL HEAD
as well as OpenSSL 0.9.8j.  Also, get rid of some warnings.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@748396 13f79535-47bb-0310-9956-ffa450edef68
2009-02-27 05:16:18 +00:00
c31e8fbb73 Implement dynamic mutex callbacks for the benefit of OpenSSL.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@687550 13f79535-47bb-0310-9956-ffa450edef68
2008-08-21 04:20:21 +00:00
b6317ebc81 Session cache interface redesign, Part 5:
Use the ap_provider interface for session cache storage providers.

* modules/ssl/mod_ssl.c (modssl_register_scache): New function.
  (ssl_register_hooks): Call it.

* modules/ssl/ssl_private.h: Define MODSSL_SESSCACHE_PROVIDER_GROUP
  and MODSSL_SESSCACHE_PROVIDER_VERSION constants.
  Remove ssl_scmode_t type.  Change nSessionCacheMode in
  SSLModConfigRec into a long sesscache_mode, storing the OpenSSL
  SSL_SESS_CACHE_* flags directly.

* modules/ssl/ssl_engine_config.c (ssl_config_global_create): Set
  sesscache_mode to SSL_SESS_CACHE_OFF by default.
  (ssl_cmd_SSLSessionCache): Remove ifdef spaghetti; fetch configured
  session cache by provider name.  Set mc->sesscache_mode for
  configured providers.

* modules/ssl/ssl_engine_init.c (ssl_init_ctx_session_cache): Use the
  configured mode flags directly from mc->sesscache_mode.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@631000 13f79535-47bb-0310-9956-ffa450edef68
2008-02-25 21:28:09 +00:00
5016eabf12 * modules/ssl/ssl_engine_init.c (ssl_init_FindCAList): Cast return
value of sk_X509_NAME_set_cmp_func to void, to avoid warnings with
recent version of OpenSSL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@630858 13f79535-47bb-0310-9956-ffa450edef68
2008-02-25 14:18:32 +00:00
fb38ad47ec Re-implement the SSL session cache abstraction using a vtable; first
step towards use of the ap_provider interface:

* modules/ssl/ssl_private.h (modssl_sesscache_provider): Add new
  vtable type.
  (SSLModConfigRec): Reference the vtable here.
  Replace all the ssl_scache_* prototypes with provider vtable objects.

* modules/ssl/ssl_scache.c (ssl_scache_init, ssl_scache_kill, 
  ssl_scache_retrieve, ssl_scache_store, ssl_scache_remove,
  ssl_ext_status_hook): Use callbacks from vtable rather than ifdef
  spaghetti.

* modules/ssl/ssl_engine_init.c (ssl_init_ctx_session_cache):
  Only install the OpenSSL callbacks if a vtable is configured.

* modules/ssl/ssl_engine_config.c (ssl_cmd_SSLSessionCache): Set up
  vtable pointer.

* modules/ssl/ssl_scache_dc.c, modules/ssl_scache_mc.c: Adjust to make
  implementations static, and add vtable definition.

* modules/ssl_scache_shmcb.c: Likewise; also move the init
  one-per-process requirement down here.

* modules/ssl_scache_dbm.c: Likewise; also (temporarily) use a local
  subpool in the store callback.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@630163 13f79535-47bb-0310-9956-ffa450edef68
2008-02-22 11:36:51 +00:00
7e66ef81fa Reduce the WARNING to a DEBUG when SNI support is enabled.
This is because a) during SNI such is normal and b) regardless 
when overlap is detected there will always be a warning:

    [warn] Init: Name-based SSL virtual hosts only work for clients 
       with TLS server name indication support (RFC 4366)

at the end of the cycle.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@620505 13f79535-47bb-0310-9956-ffa450edef68
2008-02-11 15:38:47 +00:00
495ec49226 Restructured server name indication support (PR 34607);
added missing client cert support.
Submitted by: Kaspar Brand <asfbugz velox.ch>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@611216 13f79535-47bb-0310-9956-ffa450edef68
2008-01-11 16:04:26 +00:00
9cba123cd1 added empty line after var declaration.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@607425 13f79535-47bb-0310-9956-ffa450edef68
2007-12-29 15:03:21 +00:00
2d9f0a8192 fixed code style, missing prototype warnings, disabled init for proxy, removed obsolete cast.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@607420 13f79535-47bb-0310-9956-ffa450edef68
2007-12-29 14:40:09 +00:00
b47b9d2718 Added server name indication (RFC 4366) support (PR 34607).
Submitted by: Kaspar Brand <asfbugz velox.ch>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@606190 13f79535-47bb-0310-9956-ffa450edef68
2007-12-21 13:16:21 +00:00
7471603b68 enable to build with OpenSSL 0.9.9
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@598019 13f79535-47bb-0310-9956-ffa450edef68
2007-11-25 17:51:28 +00:00
4db3a3a75a Move the thread locking upcall initialization before the hardware library init,
so the hardware library can pick up the locking callbacks. Fixes PR 20951.
Tested on Linux with trunk and an nCipher nShield card, and on Solaris 10/Sparc
on 2.0.55 with an nCipher NetHSM.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@525709 13f79535-47bb-0310-9956-ffa450edef68
2007-04-05 05:43:25 +00:00
95f79e87b6 *) adds compile-time/run time SSL-C version support
*) simplify a ton of overly-verbose legacy code
*) split the compiled-against v.s. runtime library
*) precache the results of the version string touchup



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@520701 13f79535-47bb-0310-9956-ffa450edef68
2007-03-21 01:55:29 +00:00
047d24699d * Style police / style nitpicking. No functional changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@424823 13f79535-47bb-0310-9956-ffa450edef68
2006-07-23 21:22:37 +00:00