Commit Graph

951 Commits

Author SHA1 Message Date
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
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
af4c0f4923 Use new loglevel accessor macros to simplify code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951896 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 17:01:29 +00:00
9d791e0e60 Fix some modules to make them compile with per-module loglevels.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951894 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:56:08 +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
45548d26fd * Fix compiler warning about "incompatible pointer type"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@949676 13f79535-47bb-0310-9956-ffa450edef68
2010-05-31 07:20:21 +00:00
baf08c7f66 Fix handling of extensions with types not known to OpenSSL in
PeerExtList(); parse the value as a string primitive, or else fail,
rather than rendering the raw DER blob as a string regardless of the
type:

* modules/ssl/ssl_engine_vars.c: (dump_extn_value): New function.
  (ssl_ext_list): Use it; tweak error message and free the OID object
  (thanks to drh for spotting this last issue way back).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@946240 13f79535-47bb-0310-9956-ffa450edef68
2010-05-19 15:55:21 +00:00
01d300298f Catch up with ap_[proc|global]_mutex_create api change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@940981 13f79535-47bb-0310-9956-ffa450edef68
2010-05-04 17:40:43 +00:00
26d31ba35b * Fix compiler warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@930892 13f79535-47bb-0310-9956-ffa450edef68
2010-04-05 16:10:11 +00:00
caca27d000 Code tidy, certificate extension decode can be done with the single
function X509_get_ext_d2i().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@930131 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 23:09:11 +00:00
315e2dca82 Free surrounding PKCS7 structure to avoid a leak.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@930063 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 18:47:27 +00:00
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
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
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
55b6450ecb * modules/ssl/ssl_engine_kernel.c (ssl_hook_Access): Dump the SSL
error stack if reneg fails; this will give a big hint for failures
  due to secure reneg.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@916733 13f79535-47bb-0310-9956-ffa450edef68
2010-02-26 16:05:11 +00:00
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
dcac7e0552 Catch up ssl to socache store expiry change, and clarify what the code is doing
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@907918 13f79535-47bb-0310-9956-ffa450edef68
2010-02-09 03:44:04 +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
54e9063b80 Style guides at httpd are pretty clear, macro values are UPCASE, please?
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@907472 13f79535-47bb-0310-9956-ffa450edef68
2010-02-07 20:25:21 +00:00
41d7f374af * modules/ssl/ssl_engine_kernel.c (ssl_hook_Fixup): Only set the
"ssl-secure-reneg" note if the server supports secure negotiation,
  so that a '0' value is unambiguous.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@906491 13f79535-47bb-0310-9956-ffa450edef68
2010-02-04 14:28:15 +00:00
08e1e0110b * modules/ssl/ssl_engine_kernel.c (ssl_hook_Fixup): Set
an "ssl-secure-reneg" note indicating whether the client
  supports the secure renegotiation TLS extension.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@906485 13f79535-47bb-0310-9956-ffa450edef68
2010-02-04 14:10:55 +00:00
ade83fa285 * modules/ssl/ssl_engine_vars.c (ssl_var_lookup_ssl): Add
SSL_SECURE_RENEG variable to indicate support for secure reneg.

* modules/ssl/ssl_engine_kernel.c (ssl_hook_Fixup_vars): Export
  SSL_SECURE_RENEG in the default set of variable.s


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@906057 13f79535-47bb-0310-9956-ffa450edef68
2010-02-03 14:11:19 +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
bddf9300b4 Fix default OSCP stapling port.
Submitted by: Dr Stephen Henson <steve openssl.org>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@903026 13f79535-47bb-0310-9956-ffa450edef68
2010-01-26 00:24:07 +00:00
3560f2e015 Turn static function get_server_name_for_url() into public function
ap_get_server_name_for_url() and use it where appropriate. This fixes
mod_rewrite generating invalid URLs for redirects to IPv6 literal addresses.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@900022 13f79535-47bb-0310-9956-ffa450edef68
2010-01-16 20:32:09 +00:00
c9897ccf0c Further mitigation for the TLS renegotation attack, CVE-2009-3555:
* modules/ssl/ssl_engine_kernel.c (has_buffered_data): New function.
  (ssl_hook_Access): Forcibly disable keepalive for the connection if
  there is any buffered data readable from the input filter stack.

* modules/ssl/ssl_engine_io.c (ssl_io_filter_input): Ensure that the
  BIO uses blocking operations when invoked outside direct control of
  the httpd filter stack.

Thanks to Hartmut Keil <Hartmut.Keil adnovum.ch> for proposing this
technique.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@891282 13f79535-47bb-0310-9956-ffa450edef68
2009-12-16 15:59:49 +00:00
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
a256895c80 * modules/ssl/ssl_engine_kernel.c (ssl_callback_Info): Cast away the
constness of SSL * before calling SSL_get_state, to fix warning with
  older OpenSSLs.

Reported by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@881222 13f79535-47bb-0310-9956-ffa450edef68
2009-11-17 09:54:56 +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
718a24dd45 * modules/ssl/ssl_engine_kernel.c (ssl_callback_Info): Add parentheses
around bitwise-and.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@833593 13f79535-47bb-0310-9956-ffa450edef68
2009-11-06 22:51:42 +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
cb6e1e0797 * modules/ssl/ssl_toolkit_compat.h: Fix compat with older OpenSSL.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832943 13f79535-47bb-0310-9956-ffa450edef68
2009-11-05 00:56:06 +00:00
21fa1f365b added back HAVE_OCSP define hack for non-configure platforms, but
only use if HAVE_OCSP is not yet defined as suggested by rpluem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832572 13f79535-47bb-0310-9956-ffa450edef68
2009-11-03 21:43:14 +00:00
8abd8d66b3 We now check for OCSP support in configure, so we can lose an OpenSSL version
number check.  Use a type safe STACK.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832496 13f79535-47bb-0310-9956-ffa450edef68
2009-11-03 18:19:33 +00:00
108a667e4a define HAVE_OCSP dependent on OpenSSL version to make things
easier for non-configure platforms (NetWare, Win32).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@830765 13f79535-47bb-0310-9956-ffa450edef68
2009-10-28 21:17:50 +00:00
23564c3f79 * modules/ssl/ssl_toolkit_compat.h: Fold #if checks to enable OCSP
stapling support, and also check that HAVE_OCSP is defined.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@830554 13f79535-47bb-0310-9956-ffa450edef68
2009-10-28 14:19:32 +00:00
7dc3e1fa62 * modules/ssl/ssl_util_stapling.c (stapling_cache_response): Use
apr_time_now() rather than time().

Reported by: rpluem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@830551 13f79535-47bb-0310-9956-ffa450edef68
2009-10-28 14:05:09 +00:00
edb0565bd4 * modules/ssl/ssl_util_stapling.c (stapling_cb): Use mySrvFromConn(),
thanks to rpluem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@830546 13f79535-47bb-0310-9956-ffa450edef68
2009-10-28 14:00:53 +00:00
080f897928 * module/ssl/ssl_util_stapling.c: Style fixes, no functional change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@830544 13f79535-47bb-0310-9956-ffa450edef68
2009-10-28 13:58:56 +00:00
04fd4abf90 Fix a lot of doxygen warnings. Thanks to Brad Hards for the patch.
I added a few more fixes, and there are still more that might
need a doxygen expert.

PR: 48061
Submitted by: Brad Hards
Reviewed by: poirier


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@830527 13f79535-47bb-0310-9956-ffa450edef68
2009-10-28 13:25:49 +00:00
9596adcdb1 fixed indents.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@830175 13f79535-47bb-0310-9956-ffa450edef68
2009-10-27 13:31:30 +00:00
2db0e1a114 converted tabs, removed trailing spaces.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@830045 13f79535-47bb-0310-9956-ffa450edef68
2009-10-27 01:35:22 +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
f32c6eddba replaced all backticks with single quotes in output strings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@821621 13f79535-47bb-0310-9956-ffa450edef68
2009-10-04 21:33:46 +00:00
b35eb008ea * Fix a regression from r724717 by reintroducing SSL_CLIENT_S_DN,
SSL_CLIENT_I_DN, SSL_SERVER_S_DN, SSL_SERVER_I_DN back to the environment
  variables to be set by mod_ssl.

Submitted by: Peter Sylvester <peter.sylvester edelweb.fr>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@820401 13f79535-47bb-0310-9956-ffa450edef68
2009-09-30 19:19:10 +00:00
158ed01bff fixed wrong 3rd parameter passed to apr_brigade_split_line().
Problem showed up with Sun Studio; mentioned by Jie Gao on the list.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@819373 13f79535-47bb-0310-9956-ffa450edef68
2009-09-27 18:53:33 +00:00
7bdc3a4ceb fixed compatibility to Openssl < 0.9.7g.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@819245 13f79535-47bb-0310-9956-ffa450edef68
2009-09-27 02:54:07 +00:00