1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

109 Commits

Author SHA1 Message Date
Doug MacEachern
aeb7f9eb0b add configure checks for ssl functions:
-SSL_set_state: macro in OpenSSL, might be a function in a patched sslc
-SSL_set_cert_store: patch submitted to OpenSSL, might be applied to
OpenSSL or sslc


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94223 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 17:02:56 +00:00
Doug MacEachern
e6392769aa 2nd arg to SSL_set_cipher_list in sslc is char *
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94205 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 03:11:22 +00:00
Doug MacEachern
66419ef565 sslc 1.x SSL_set_verify only takes 2 args
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94204 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 03:09:11 +00:00
Doug MacEachern
7f4a6ff760 sslc adds a second, unused param to X509_verify_cert
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94202 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 03:02:10 +00:00
Doug MacEachern
ebe92b6f8b add modssl_session_get_time() function to give mod_ssl what it needs
from SSL_SESSION_get_time() if using OpenSSL or sslc.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94195 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 01:28:20 +00:00
Doug MacEachern
7c1521f253 per-dir SSLCACertificate{File,Path} cannot use SSL_CTX_set_cert_store
as the 1.x based module does, since the function is not thread-safe.
a patch has been submitted to OpenSSL to support SSL_set_cert_store
which is thread safe.  this feature is enabled by default in the
current 1.x based module, we only enable it if the SSL_set_cert_store
function is available.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94179 13f79535-47bb-0310-9956-ffa450edef68
2002-03-26 16:57:49 +00:00
Cliff Woolley
5a52f372e4 Fix a possibly-uninitialized warning and a boolean logic bug
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93992 13f79535-47bb-0310-9956-ffa450edef68
2002-03-18 03:19:30 +00:00
Roy T. Fielding
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Doug MacEachern
7d097d17ad generalize session logging into ssl_session_log() function
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93906 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 17:02:45 +00:00
Doug MacEachern
ed35c47220 SSL_SESSION_id2sz() was NOT THREAD SAFE. it returned a pointer to a
static variable.  fixed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93899 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 06:41:46 +00:00
Doug MacEachern
ccaced8c5d SSL_SESSION_id2sz() is somewhat expensive, make sure we only call it
if SSLLogLevel >= info


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93898 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 06:12:24 +00:00
Doug MacEachern
5de4869446 cleanup logging of CRL, includes ridding of some malloc/frees
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93897 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 05:30:43 +00:00
Doug MacEachern
63e70cd522 cleanup tmp key callbacks. each had assigned the same (1024 bit) value
in 3 different places.  the old code did nothing special in the case
of the export flag either.

add an ssl_log in each to trace when keys are being handed out.

add some XXX comments.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93885 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 23:42:53 +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
72814e709a dropping hungarian notation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93851 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 04:41:57 +00:00
Doug MacEachern
1fcbc73b13 various style fixups / general changes to make code more readable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93848 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 01:40:02 +00:00
Doug MacEachern
5f33a419b4 don't allocate SSLConnRec unless ssl is enabled on this vhost.
also provides a shorter shortcut for mod_ssl hooks to decline if ssl
is not enabled.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93823 13f79535-47bb-0310-9956-ffa450edef68
2002-03-10 00:22:07 +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
Cliff Woolley
7b7ec65b73 Silence a gcc warning about cpType being possibly used uninitialized,
and constify it while I'm at it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93188 13f79535-47bb-0310-9956-ffa450edef68
2002-02-03 01:50:58 +00:00
Martin Kraemer
9aaf89fa5c Use symbolic names
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93130 13f79535-47bb-0310-9956-ffa450edef68
2002-01-31 14:55:05 +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
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
4e29aa9d4d get rid of warning introduced by previous patch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92245 13f79535-47bb-0310-9956-ffa450edef68
2001-11-29 07:30:30 +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
6dd4b15f65 avoid a call to X509_NAME_oneline() and ASN1_INTEGER_get() in
ssl_callback_SSLVerify_CRL() unless SSLLogLevel >= info, otherwise the
expense is unused.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92238 13f79535-47bb-0310-9956-ffa450edef68
2001-11-29 06:52:18 +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
a2daa5ab2b ssl_callback_SSLVerify() was calling (the expensive) X509_NAME_oneline()
function and free() of the return value twice each, for logging
regardless of SSLLogLevel.  changed to happen only if SSLLogLevel >= trace
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92236 13f79535-47bb-0310-9956-ffa450edef68
2001-11-29 06:27:41 +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
e11207af62 remove setting of ap::{http::method,default::port} r->notes.
these notes are unused, they handled by hooks.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92210 13f79535-47bb-0310-9956-ffa450edef68
2001-11-28 04:24:07 +00:00
Doug MacEachern
758b54d0fd don't bother setting the ssl info callback unless SSLLogLevel >= info
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92151 13f79535-47bb-0310-9956-ffa450edef68
2001-11-24 00:40:15 +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
931bf95383 return from ssl_callback_LogTracingState if sc->nLogLevel < SSL_LOG_INFO
else there are 5 (expensive!) calls made to ssl_var_lookup on every request
for info that will never be logged
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92119 13f79535-47bb-0310-9956-ffa450edef68
2001-11-22 01:40:26 +00:00
Doug MacEachern
a626a1af07 get rid of 'apctx' table that used to live in SSL_get_app_data2(ssl)
change app_data2 to be the request_rec itself.
if something needs per-request context in the future,
it can use r->request_config

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92113 13f79535-47bb-0310-9956-ffa450edef68
2001-11-22 00:42:35 +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
Doug MacEachern
05c8ba57eb fix segv triggered by recent ap_lingering_close change
need to set SSLFilterRec.pssl = NULL when ssl_hook_CloseConnection is called
otherwise, ap_lingering_close -> ap_flush_conn will call ssl_io_filter_Output
which thinks it can still use the SSLFilterRec.pssl
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91886 13f79535-47bb-0310-9956-ffa450edef68
2001-11-12 22:01:14 +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
Doug MacEachern
d792836690 remove #if 0-ed ssl_hook_NewConnection code; was only left for reference,
no longer needed
remove #if 0-ed ssl_hook_TimeoutConnection code; ssl no longer talks directly
to the socket
PR:
Obtained from:
Submitted by:    madhu
Reviewed by:	 dougm


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90511 13f79535-47bb-0310-9956-ffa450edef68
2001-08-22 21:37:15 +00:00
William A. Rowe Jr
6333b12a2e Explicitly fix some types, and opt-out on macro conflicts
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90496 13f79535-47bb-0310-9956-ffa450edef68
2001-08-22 16:21:40 +00:00
Doug MacEachern
3468587a6c and swap Auth/UserCheck names to match the hook names, in hopes of preventing further foncusion
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90464 13f79535-47bb-0310-9956-ffa450edef68
2001-08-21 06:08:04 +00:00
Doug MacEachern
89052f10c2 remove #if 0-ed ap_flush_conn() call; filters now handle flushing
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90446 13f79535-47bb-0310-9956-ffa450edef68
2001-08-20 23:58:48 +00:00
Doug MacEachern
d79cea3d70 enable ssl Translate, UserCheck, Access and Auth hooks
add support for renegotiation during the Access hook
this requires hooking into the read and write SSL BIOs in order to
flush data to the client and read from the filter chain

this also requires that the ssl filters become "aware" that
renegotitation is in progress so that the BIOs are left alone for
SSL_renegotiate/SSL_do_handshake in ssl_hook_Access to deal with

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90185 13f79535-47bb-0310-9956-ffa450edef68
2001-08-16 03:58:16 +00:00
William A. Rowe Jr
828dc11281 enables the use of the ssl_var_lookup functionality in the various source
files in modules/ssl. The ap_hook_* functions are still not yet ported to
Apache 2.0 style

Submitted by:	Madhusudan Mathihalli <madhusudan_mathihalli@hp.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89819 13f79535-47bb-0310-9956-ffa450edef68
2001-07-31 03:40:47 +00:00
William A. Rowe Jr
333d6f49ab - eliminated the use of ssl_log - it used to cause seg faults during cleanup
since the conn_rec will no longer be valid.
- eliminated the "for (;;)" processing loop in ssl_io_filter_Output() -
we'll have to do that in churn_output() if required, so that any remaining
OpenSSL data (if available) is transferred before we call the
CloseConnection.
- Any remaining data in SSL should be cleaned up ideally in the
APR_BUCKET_IS_EOS() processing stage itself, as we close the SSL connection
here.


Submitted by:	Madhusudan Mathihalli <madhusudan_mathihalli@hp.com>
Reviewed by:	William Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89816 13f79535-47bb-0310-9956-ffa450edef68
2001-07-31 03:04:55 +00:00
William A. Rowe Jr
ac232e1147 More XHTML foo.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89805 13f79535-47bb-0310-9956-ffa450edef68
2001-07-30 22:30:51 +00:00
Ralf S. Engelschall
534c18c054 Avoid uninitialized variable due to still disabled code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89705 13f79535-47bb-0310-9956-ffa450edef68
2001-07-25 10:23:03 +00:00