1
0
mirror of https://github.com/apache/httpd.git synced 2025-06-07 20:02:05 +03:00

126 Commits

Author SHA1 Message Date
Bradley Nicholes
74c5908625 Allow the enabled flag to be set to more than just TRUE or FALSE so that
the OPTIONAL flag can be correctly merged within the
ssl_config_server_merge() function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102860 13f79535-47bb-0310-9956-ffa450edef68
2004-03-05 02:44:40 +00:00
Joe Orton
1c5889d105 * modules/ssl/ssl_engine_init.c (ssl_init_Engine): Log the OpenSSL
error stack contents if engine load/init fails.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102857 13f79535-47bb-0310-9956-ffa450edef68
2004-03-04 22:00:25 +00:00
Joe Orton
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
André Malo
a688f06b19 fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102618 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:31:03 +00:00
André Malo
0b6155c539 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102573 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 12:52:25 +00:00
André Malo
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Joe Orton
2c999f855a * modules/ssl/ssl_engine_init.c (ssl_init_proxy_certs): Fail early
(rather than segfault later) if a client cert is configured which is
missing either the certificate or private key.

PR: 24030


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101878 13f79535-47bb-0310-9956-ffa450edef68
2003-11-25 12:35:45 +00:00
Jeff Trawick
aa21671e13 switch to APR 1.0 API (which is still in flux)
because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101154 13f79535-47bb-0310-9956-ffa450edef68
2003-09-03 19:27:12 +00:00
William A. Rowe Jr
8606e3c92a Although we initialize mc->pid in the child init phase,
we haven't initialized it before initially performing
  our ssl_rand_seed() in the parent/postconfig phase.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100912 13f79535-47bb-0310-9956-ffa450edef68
2003-08-05 22:49:42 +00:00
William A. Rowe Jr
1e0682040d Reaction to Jeff Trawick's observations that we are double-initializing
dynalinked OpenSSL Engines and Configs.  Move the library teardown code
  so that it is torn down in the proper order, corresponding to when the
  library itself was initialized.  And leave a little reminder that some
  memory diagnostics would be good if OpenSSL is built for malloc debugging.

Suggested by: Geoff Thorpe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100288 13f79535-47bb-0310-9956-ffa450edef68
2003-06-17 17:44:40 +00:00
William A. Rowe Jr
282d19b590 Solve a pretty horrific bug in SSLCryptoDevice and other places where
the config cmd processors should be examining the SSL context.  We must
  initialize the SSL library before we can actually obtain any useful
  information from the SSL library.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100107 13f79535-47bb-0310-9956-ffa450edef68
2003-05-30 20:58:55 +00:00
William A. Rowe Jr
fb9c4b137c Based on list discussion between myself and Geoff, it seems prudent
to check for both the existence of the openssl/engine.h header file
  and some 'expected function' such as ENGINE_init() (better suggestions
  are welcome.)  Also clear up some confusion; so long as we have
  ENGINE_load_builtin_engines() we should attempt to preload those.

  This patch protects all ENGINE-based code within the tests for the
  engine header and function, and changes a version test into a
  function test.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100104 13f79535-47bb-0310-9956-ffa450edef68
2003-05-30 18:41:53 +00:00
William A. Rowe Jr
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
William A. Rowe Jr
e25454c894 Introduce a number of SSLC hints to mod_ssl, including the following
type overrides;

    MODSSL_CLIENT_CERT_CB_ARG_TYPE
    MODSSL_PCHAR_CAST      (for a host of non-void/const sslc values)
    modssl_read_bio_cb_fn  (for several callbacks with same prototypes)

  Declare callback functions appropriately.

  And protect us from indetermineant toolkits with
  #error "Unrecognized SSL Toolkit!"


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99183 13f79535-47bb-0310-9956-ffa450edef68
2003-04-03 04:54:20 +00:00
William A. Rowe Jr
27b6a574d3 DougM confirms Madhu's suspicions, this change was inadvertent.
Reverting to no longer skip the first cert in the chain.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98896 13f79535-47bb-0310-9956-ffa450edef68
2003-03-06 08:43:39 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
William A. Rowe Jr
8803963b14 After introducing tests in the cmds, we lose the absolute authority
of the CRYPTO_malloc_init() which must happen the moment we load the
  module and prior to *any* ssl library fn invocation.

  Moved the CRYPTO_malloc_init() into the ssl_register_hooks() function,
  the absolute first call made into any loaded module.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98252 13f79535-47bb-0310-9956-ffa450edef68
2003-01-13 17:10:42 +00:00
William A. Rowe Jr
d0dd7a4711 All we care about is the type and name, just ask for the type and name.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98090 13f79535-47bb-0310-9956-ffa450edef68
2002-12-23 09:09:21 +00:00
William A. Rowe Jr
2f62c790c7 After some productive feedback and no negative feedback, introduce
SSLEngine upgrade so that we can begin and continue to support these
  facilities.  This makes it simpler to keep this effort (while we have
  no known clients that support Connection: upgrade at this time), and
  begin refactoring more of SSL into smaller and tighter (and then optional)
  components.

  Submitted by: Ryan Bloom
  Reviewed by: William Rowe, Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97912 13f79535-47bb-0310-9956-ffa450edef68
2002-12-14 07:46:45 +00:00
Jeff Trawick
55149170fb Rearrange OpenSSL engine initialization to support RAND
redirection on crypto accelerator.

Submitted by:     Frederic DONNAT <frederic.donnat@zencod.com>
Reviewed by:	  Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97482 13f79535-47bb-0310-9956-ffa450edef68
2002-11-11 13:16:17 +00:00
William A. Rowe Jr
ac212ecc65 Fix memory leak in mod_ssl from internal SSL library allocations
within SSL_get_peer_certificate and X509_get_pubkey.

Submitted by:	Zvi Har'El <rl@math.technion.ac.il>
Reviewed by:	Madhusudan Mathihalli <madhusudan_mathihalli@hp.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97344 13f79535-47bb-0310-9956-ffa450edef68
2002-10-29 21:12:34 +00:00
Ryan Bloom
658c2437bd This stuff shouldn't have been committed. This is the SSL upgrade stuff,
and it was included in a commit that shouldn't have touched these files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97201 13f79535-47bb-0310-9956-ffa450edef68
2002-10-14 04:15:58 +00:00
Ryan Bloom
37f9061757 Fix a compile of compiler warnings. I don't know how these slipped past.
Also, uncomment a line of code that the last commit should have uncommented.
Randall found this line and the fix, but I forgot to uncomment this line
along with the fix.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97179 13f79535-47bb-0310-9956-ffa450edef68
2002-10-11 15:29:22 +00:00
William A. Rowe Jr
2604f8bdbb Changes for deprecated apr_is_fnmatch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95976 13f79535-47bb-0310-9956-ffa450edef68
2002-07-08 17:43:34 +00:00
Jeff Trawick
40735dc8cd make some small steps towards getting the post config hook
to return an error rather than exiting directly


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95567 13f79535-47bb-0310-9956-ffa450edef68
2002-06-07 12:51:49 +00:00
William A. Rowe Jr
4a621ec661 The only remaining question ... are nested or strictly unnested locks
expected by OpenSSL?  Right now I've left it as _DEFAULT for the platform
  preference.  Very simple code really - the server_rec was superfluous.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95497 13f79535-47bb-0310-9956-ffa450edef68
2002-06-04 02:19:33 +00:00
Doug MacEachern
d9e9c7de3b prevent possible segv in ssl_init_CheckServers if s->addrs is NULL.
for example: <VirtualHost *:>, for which the core only spits out a warning:
 Name or service not known: Cannot resolve host name *: --- ignoring!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95158 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 18:21:12 +00:00
Jeff Trawick
50bac91072 stop using APLOG_NOERRNO in calls to ap_log_[pr]error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95150 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:24:17 +00:00
Justin Erenkrantz
fafabb637f Remove SSLLog and SSLLogLevel directives in favor of having mod_ssl use the
standard ErrorLog directives.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95129 13f79535-47bb-0310-9956-ffa450edef68
2002-05-16 06:09:13 +00:00
Justin Erenkrantz
d0214d5ae7 Change mod_ssl from using ssl_log() to ap_log_error().
The issue is that ssl_log doesn't handle apr_status_t result codes.  This
leads to a number of places (esp. with mutexes) where the error codes get
lost.  Rather than extending ssl_log further, since mod_ssl is part of
our core, migrate to ap_log_error.  This means that mod_ssl no longer
does its own logging.

Most uses of SSL_ADD_ERRNO are now mapped correctly to apr_status_t values
(mainly because the APIs that used to return errnos are now APRized and
have apr_status_t codes available).

SSL_LOG_TRACE and SSL_LOG_DEBUG were mapped to the APLOG_DEBUG values.
mod_ssl prints out a LOT of debugging information, so mod_ssl with LogLevel
Debug may not be a good idea - perhaps mod_ssl should be less chatty.

Numerous printf type collisions were also resolved.

(The ssl logging code itself will be removed in a subsequent commit.)

This has been discussed on dev@httpd, but the fact that there isn't
much to review besides the mindless changes, I'm going to commit now
and rely on CTR if I screwed up anything on the translation.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95127 13f79535-47bb-0310-9956-ffa450edef68
2002-05-16 05:17:11 +00:00
Justin Erenkrantz
d28c4dae36 Stop using SSL_ADD_SSLERR option in ssl_log() and replace with new
ssl_log_ssl_error() function that wraps ap_log_error instead.

This begins the migration from ssl_log() -> ap_log_error().  Divorcing
ourselves from the SSL_ADD_SSLERR option is required to make the next
pass easier.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95122 13f79535-47bb-0310-9956-ffa450edef68
2002-05-15 23:10:33 +00:00
Doug MacEachern
78ee6051f8 copy-n-pasto: need to use SSL_X509_INFO_load_*path* on pkp->cert_path
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94405 13f79535-47bb-0310-9956-ffa450edef68
2002-04-02 21:57:31 +00:00
Doug MacEachern
51bbfbacd5 enable the verify callback for proxy
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94334 13f79535-47bb-0310-9956-ffa450edef68
2002-03-30 06:20:16 +00:00
Doug MacEachern
9ee8bc12b5 implement proxy client certificate callback
(uses SSLProxyMachineCertificate{File,Cert} when downstream server
requires a client certificate)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94329 13f79535-47bb-0310-9956-ffa450edef68
2002-03-30 05:40:02 +00:00
Doug MacEachern
5021db7bd6 load SSLProxyMachineCertificate{File,Path}
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94324 13f79535-47bb-0310-9956-ffa450edef68
2002-03-30 01:50:10 +00:00
Doug MacEachern
5e1c0e2c15 add SSLProxyEngine directive. this was not required in the 1.x based
mod_ssl because the SSL_CTX was created and configured for *every*
request.  unlike in 2.0 where we configure the proxy SSL_CTX at
startup time, which is much better for performance.  but we don't want
to configure a proxy context for every vhost if it isn't going to be
used, for the same reasons we don't create a server context for every
vhost unless SSLEngine is on.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94314 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 17:56:33 +00:00
Doug MacEachern
f8ce625de8 init proxy context
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94292 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 04:48:01 +00:00
Doug MacEachern
a24fd6a181 cleanup the proxy context
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94288 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 02:59:27 +00:00
Doug MacEachern
7b86fe98a0 change existing ssl_init_ctx() to ssl_init_ctx_protocol()
new ssl_init_ctx() inits the lot: protocol, session_cache, callbacks,
verify, cipher suite, crl, cert_chain

new ssl_init_server_ctx function inits everything for sc->server


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94285 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 02:20:58 +00:00
Doug MacEachern
6d42555a01 proxy will have a different verify callback
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94283 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 02:09:59 +00:00
Doug MacEachern
192828c57c proxy needs to use client ssl method
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94282 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 02:06:57 +00:00
Doug MacEachern
ea4cfaae7c setup sc->proxy->sc
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94281 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 02:01:49 +00:00
Doug MacEachern
78b02f8110 switch from SSLSrvConfigRec* to modssl_ctx_t* in the ssl_init_ctx*
functions


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94274 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 19:48:31 +00:00
Doug MacEachern
1d76ab39ff breakup SSLSrvConfigRec in preparation for proxy support:
+ modssl_pk_server_t - certs/keys for the server
+ modssl_pk_proxy_t  - certs/keys for the proxy
+ modssl_auth_ctx_t  - stuff related to authentication that can also
                       be per-dir, used by both server and proxy
+ modssl_ctx_t       - context that can be used by both server and proxy
+ SSLSrvConfigRec    - now contains original stuff specific to the
                       server config and modssl_ctx_t *server, *proxy


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94267 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 18:50:07 +00:00
Doug MacEachern
d5c395f0e7 de-hungarian-ize server config member names which are going to stay
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94264 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 17:11:12 +00:00
Doug MacEachern
d40a4f8d8e remove error msg hint that is no longer true
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94261 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 02:51:52 +00:00
Doug MacEachern
5a392794c4 fixup naming:
ssl_init_ctx_* will be used for both proxy and server
 ssl_init_server_* is specific to the server


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94260 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 02:46:28 +00:00
Doug MacEachern
f69256ac13 move context callback setting to ssl_init_ctx_callbacks function
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94259 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 02:40:01 +00:00
Doug MacEachern
972e8bdafe move server cert/key initialization to ssl_init_server_certs function
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94258 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 02:36:05 +00:00