1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

176 Commits

Author SHA1 Message Date
Doug MacEachern
55294115e5 use ptemp in ssl_init_FindCAList() rather than creating a subpool.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93895 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 04:59:19 +00:00
Doug MacEachern
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
Doug MacEachern
d9d26c6b82 for the sake of readablity,
change: SSL_TKPIDX_{DH,RSA}{512,1024}
to:     SSL_TMP_KEY_{DH,RSA}_{512,1024}


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93883 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 23:05:33 +00:00
Doug MacEachern
52ff7b736e split ssl_init_TmpKeysHandle function to init/free functions,
and make them static to ssl_engine_init.c


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93882 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 22:50:38 +00:00
Doug MacEachern
15d581b6fe it is not required that temporary keys survive restarts, since they
are generated and destroyed on every restart.

so get rid of SSLModConfigRec.tTmpKeys table and mess that was
managing it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93881 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 22:34:31 +00:00
Doug MacEachern
bed8256dc1 remove version checks for using EGD
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93879 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 22:11:51 +00:00
Doug MacEachern
47c4501000 we require OpenSSL 0.9.6+
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93877 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 22:07:12 +00:00
Doug MacEachern
4e2c5954f9 making ssl_init_SSLLibrary() static
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93874 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 21:53:44 +00:00
Doug MacEachern
2e7c1f17cc add SSL_VERIFY_PEER_STRICT shortcut for often used flags
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93846 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 00:06:06 +00:00
Doug MacEachern
e359ecfc06 remove unused ap_server_ctx member from SSLSrvConfigRec
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93785 13f79535-47bb-0310-9956-ffa450edef68
2002-03-08 00:03:50 +00:00
Doug MacEachern
f702218cea s/const void/const char/g in ssl_asn1_table api
pointed out by gstein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93653 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 05:24:06 +00:00
Cliff Woolley
8097066e90 Consensus is that we should not use the scoreboard as a source of entropy.
Reviewed by: OtherBill, Justin, Madhu


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93652 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 04:35:17 +00:00
Doug MacEachern
0d2e1d0893 reuse vhost keys for asn1 tables where keys are allocated out
of s->process->pool to prevent "leaking" each time we format
a vhost key.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93616 13f79535-47bb-0310-9956-ffa450edef68
2002-02-28 01:30:18 +00:00
Doug MacEachern
b4f77dcf27 switch SSLModConfigRec.tPublicCert to ssl_asn1_table api to prevent
leakage on restarts.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93615 13f79535-47bb-0310-9956-ffa450edef68
2002-02-28 00:28:05 +00:00
Doug MacEachern
e778179d1f switch SSLModConfigRec.tPrivateKey to ssl_asn1_table api to prevent
leakage on restarts.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93614 13f79535-47bb-0310-9956-ffa450edef68
2002-02-28 00:23:32 +00:00
Doug MacEachern
01b903dfc4 add ssl_asn1_table_get() wrapper and change ssl_init_TmpKeysHandle()
to use it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93613 13f79535-47bb-0310-9956-ffa450edef68
2002-02-28 00:10:52 +00:00
Doug MacEachern
d6a76369d5 mod_ssl was "leaking" on restart since mc->tTmpKeys table entries
were allocated using apr_palloc out of s->process->pool and pushed
into an apr_array_header_t.
solve the problem by moving from apr_array_header_t's to an apr_hash_t.
also add ssl_asn1_table_{set,unset} wrappers to use malloc/free so we
do not "leak" from s->process->pool.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93612 13f79535-47bb-0310-9956-ffa450edef68
2002-02-28 00:01:57 +00:00
William A. Rowe Jr
7b21fb2549 Introduce the PassPhraseDialog 'pipe' mechanism.
This is the directive handling commit only, the mechanics patch will
  follow.  PassPhraseDialog "|/path/to/pipe" will use the bidirectional
  pipe to have a 'conversation', along the lines of the tty dialog with
  PassPhraseDialog 'builtin'.  This is entirely different than the 'exec'
  method, which simply runs once for each passphrase, and doesn't allow
  for failure/retries, and certainly doesn't offer any sensible 'dialog'.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93606 13f79535-47bb-0310-9956-ffa450edef68
2002-02-27 19:51:33 +00:00
Doug MacEachern
0ba62becc5 changing mod_ssl to do a full startup/teardown on each restart rather
than hack to only read passphrase on 1st round startup.  this change:
- fixes current segv on restarts (SHARED_MODULE is not defined)
- allows LoadModule ssl_module to be added to httpd.conf on restart
  (was core dumping previously)
- allows certs/keys to be changed on restart provided key is not
  encrypted or SSLPassPhraseDialog is exec.  if key is encrypted and
  SSLPassPhraseDialog is builtin, existing private keys will be reused
  on restart (which happens currently for any type of key/dialog).

note: mod_ssl currently leaks on restart; leaks more with this change.
      fixes to come.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93585 13f79535-47bb-0310-9956-ffa450edef68
2002-02-27 03:21:09 +00:00
Ryan Bloom
b8c76eed10 Grrrrr..... We should really use the correct line endings on all
platforms.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93582 13f79535-47bb-0310-9956-ffa450edef68
2002-02-27 00:39:01 +00:00
Cliff Woolley
0f45e62dcd Forward port of changes in mod_ssl for Apache 1.3 up through mod_ssl
version 2.8.7-1.3.23.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93564 13f79535-47bb-0310-9956-ffa450edef68
2002-02-25 04:23:03 +00:00
Doug MacEachern
cdea8a5477 move OpenSSL specific SSL_{get,set}_state macros to the #ifdef'd group of
macros for OpenSSL in mod_ssl.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92918 13f79535-47bb-0310-9956-ffa450edef68
2002-01-18 23:26:46 +00:00
Doug MacEachern
f2e97102ce rewrite of mod_ssl input filter for better performance and less memory usage
PR:
Obtained from:
Submitted by:
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92873 13f79535-47bb-0310-9956-ffa450edef68
2002-01-17 00:54:33 +00:00
William A. Rowe Jr
ffeb2bbe16 The mutex must be pool-managed, not ssl managed. We are encountering
segfaults on Win32 when the cleanup of the mutex occurs after the pool
  was destroyed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92818 13f79535-47bb-0310-9956-ffa450edef68
2002-01-11 06:05:18 +00:00
Doug MacEachern
c53456b4c1 mod_ssl adjustments to help with using toolkits other than OpenSSL:
Use SSL functions/macros instead of directly dereferencing SSL
  structures wherever possible.
  Add type-casts for the cases where functions return a generic pointer.
  Add $SSL/include to configure search path.
PR:
Obtained from:
Submitted by:	Madhusudan Mathihalli <madhusudan_mathihalli@hp.com>
Reviewed by:	dougm


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92800 13f79535-47bb-0310-9956-ffa450edef68
2002-01-10 04:55:19 +00:00
Doug MacEachern
7712c61146 get SSLPassPhraseDialog exec: working by passing the proper arguments
to apr_proc_create()
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92786 13f79535-47bb-0310-9956-ffa450edef68
2002-01-09 19:24:32 +00:00
Doug MacEachern
d06327e27b the client cert X509_NAME_oneline() is only used if SSLFakeBasicAuth
is happening.  so avoid calling that unless needed and just stash a
pointer to the client cert for the boolean checks that the client
provided a cert.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92240 13f79535-47bb-0310-9956-ffa450edef68
2001-11-29 07:07:36 +00:00
Doug MacEachern
6259b77f33 get rid of ssl_log_applies() function. it does more than we need and
what should be done with a macro.  it was only used once anyhow.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92237 13f79535-47bb-0310-9956-ffa450edef68
2001-11-29 06:34:53 +00:00
Doug MacEachern
2797fd1cc5 fix for last change that removed ssl_util_getmodconfig():
go back to using s->process->pool userdata, but just to store the
global module config during startup so we only create _one_ SSLModConfigRec.
(didn't realize this function was called in both ssl_init_Module and
ssl_config_server_create)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92235 13f79535-47bb-0310-9956-ffa450edef68
2001-11-29 06:15:01 +00:00
Doug MacEachern
29ba8b4f1d ssl_util_getmodconfig() and ssl_util_getmodconfig_ssl() show up high
in the gprof profile.  there's no need for the "global" SSLModConfigRec
to live in the s->process->pool userdata table.  we now just point the
SSLSrvConfigRec in each server_rec.module_config to the SSLModConfigRec
so we can access it directly which is much faster.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92234 13f79535-47bb-0310-9956-ffa450edef68
2001-11-29 05:45:48 +00:00
Doug MacEachern
1c3ac886e0 call getpid() once at child init and save in the SSLModConfigRec
to avoid getpid() calls at request time
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92231 13f79535-47bb-0310-9956-ffa450edef68
2001-11-29 05:04:22 +00:00
Doug MacEachern
706c0cceee calculate VHostID length at startup rather than request time.
change ap_md5() call in ssl_hook_pre_connection() to ap_md5_binary()
that uses the precalculated sc->nVHostID_length to avoid a strlen() call.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92216 13f79535-47bb-0310-9956-ffa450edef68
2001-11-28 05:50:55 +00:00
Doug MacEachern
9c7cc5063d avoid calling ssl_util_vhostid() (and apr_sprintf underneath) at
request time by calling it at startup time and saving the value in the
SSLSrvConfigRec.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92215 13f79535-47bb-0310-9956-ffa450edef68
2001-11-28 05:44:50 +00:00
Ian Holsman
86b792b21c Modify post_config hook so that it can return a error,
causing the server not to start.
previous method was to call exit(1) which would not fail
gracefully

PR:
Obtained from:
Submitted by:
Reviewed by:	(Idea only Jeff Trawick)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92144 13f79535-47bb-0310-9956-ffa450edef68
2001-11-23 16:35:22 +00:00
Doug MacEachern
03d6bfb025 avoid a couple of calls to ssl_util_vhostid() and apr_psprintf()
unless loglevel >= SSL_LOG_INFO
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92122 13f79535-47bb-0310-9956-ffa450edef68
2001-11-22 02:44:35 +00:00
Doug MacEachern
451e81d5d1 optimize lookup of ssl-{unclean,accurate}-shutdown flags:
- only look through the table once, rather than 2 apr_table_gets()
- case-sensitive and use strcmp() as little as possible
- only lookup once per-connection, as the flags will not change across
  keepalive requests
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92121 13f79535-47bb-0310-9956-ffa450edef68
2001-11-22 02:23:09 +00:00
Doug MacEachern
750338bfd7 remove AP_CTX_* macros which are no longer used
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92114 13f79535-47bb-0310-9956-ffa450edef68
2001-11-22 00:43:43 +00:00
Doug MacEachern
9dc6d34af4 move c->notes.ssl::verify::depth to SSLConnRec.verify_depth
note: may actually be removed unless somebody can figure out why it is in
there to begin with
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92111 13f79535-47bb-0310-9956-ffa450edef68
2001-11-22 00:25:00 +00:00
Doug MacEachern
38ee9028fc move c->notes.ssl::verify::{info,error} to SSLConnRec.verify_{info,error}
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92109 13f79535-47bb-0310-9956-ffa450edef68
2001-11-21 22:29:14 +00:00
Doug MacEachern
f4792b5423 move c->notes.ssl::flag::{unclean,accurate}-shutdown to SSLConnRec.shutdown_type
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92100 13f79535-47bb-0310-9956-ffa450edef68
2001-11-21 19:22:46 +00:00
Doug MacEachern
0e5e9c10a2 move c->notes.ssl::client::dn to SSLConnRec.client_dn
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92094 13f79535-47bb-0310-9956-ffa450edef68
2001-11-21 18:08:33 +00:00
Doug MacEachern
6a641aae9c start moving c->notes usage to a new SSLConnRec structure hanging off of
c->conn_config
PR:
Obtained from:
Submitted by:
Reviewed by: rbb, madhu


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92093 13f79535-47bb-0310-9956-ffa450edef68
2001-11-21 17:45:24 +00:00
Justin Erenkrantz
e3d203298e This is the mod_ssl input filtering rewrite. Lots of stuff here. I also
changed some of the style issues within the filtering code to conform to
the rest of the server.

Various incarnations of this patch have been posted to dev@httpd without
feedback.  Now that it passes all of the httpd-test cases (with the
exception of module/negotiation test which fails without mod_ssl anyway),
it is time to check it in.

Please review and test.  We are under C-T-R rules, so I'm going to take
advantage of that and commit it now.  I have tested this about as much
as I can and it seems to work from everything I can give to it.
Considering that mod_ssl was broken before this commit, this is an
improvement.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91414 13f79535-47bb-0310-9956-ffa450edef68
2001-10-11 01:49:21 +00:00
William A. Rowe Jr
1cf6e24fb0 I don't seriously expect this solves the segfault ... but it does make
the code more legible, and protects particularly ugly unset values.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90979 13f79535-47bb-0310-9956-ffa450edef68
2001-09-10 04:21:40 +00:00
Doug MacEachern
6f3f1853e4 Implement CRYPTO_set_locking_callback() for mod_ssl
PR:
Obtained from:
Submitted by:	Madhusudan Mathihalli <madhusudan_mathihalli@hp.com>
Reviewed by:	dougm


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90612 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 04:08:04 +00:00
Doug MacEachern
48c41169f0 support "SSLVerifyClient optional_no_ca"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90599 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 00:09:30 +00:00
William A. Rowe Jr
ebce174d94 Add some appropriate constness to the config
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90577 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 19:42:44 +00:00
Doug MacEachern
99b2042f26 register ssl_var_lookup() as an optional function
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90537 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 02:46:23 +00:00
William A. Rowe Jr
de9321e1e6 Complete the rename of the ssl_scache_status_register and
ssl_ext_proxy_register (which has yet to be renamed for it's
  future location, since I'm not going further at the moment
  with implementing it's functionallity, all my focus is on
  the ssl_var_register arm.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90524 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 00:06:27 +00:00
William A. Rowe Jr
dfc5bb55f4 Remove a ton o' cruft. Moves the mod_log_config 'var' extensions to
ssl_engine_vars.c.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90517 13f79535-47bb-0310-9956-ffa450edef68
2001-08-22 22:58:07 +00:00