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

103 Commits

Author SHA1 Message Date
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
Doug MacEachern
44f93970ac copy DSA params to server server during key import
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94257 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 02:28:06 +00:00
Doug MacEachern
0a76ba100d fix logic from last commit, need to always try importing _both_ rsa
and dsa


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94256 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 02:09:58 +00:00
Doug MacEachern
1712e063a9 fold some duplication into generic ssl_server_import_key function
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94255 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 02:01:03 +00:00
Doug MacEachern
b63b80acf5 fold some duplication into generic ssl_server_import_cert function
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94253 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 01:47:50 +00:00
Doug MacEachern
886376b4cb move server cert checking into generic ssl_check_public_cert function.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94252 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 01:32:41 +00:00
Doug MacEachern
e6f3b17fd0 move server specific init config checks into ssl_init_check_server
function (ssl_init_check_proxy will be different)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94250 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 01:14:53 +00:00
Doug MacEachern
52d5e83027 break out certificate chain initialization into
ssl_init_cert_chain function


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94249 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 01:07:20 +00:00
Doug MacEachern
249519625c there is a heaping pile of:
ssl_log(s, flags, "Init: (%s) ...", sc->szVHostID)
add SSL_INIT flag to cut down some noise and end up with:
 ssl_log(s, flags, "...")


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94247 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 00:34:13 +00:00
Doug MacEachern
934bb7f29b break out certificate revocation list initialization into
ssl_init_crl function


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94246 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 23:53:27 +00:00
Doug MacEachern
a413cb6798 break out cipher suite initialization into ssl_init_cipher_suite function
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94245 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 23:49:09 +00:00
Doug MacEachern
20ae69adba move warning about session cache not being configured to ssl_scache_init
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94243 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 23:25:58 +00:00
Doug MacEachern
9379b72632 break out SSL_CTX session initialization into
ssl_init_session_cache_ctx function


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94242 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 23:19:08 +00:00
Cliff Woolley
af9bfbb2b3 "Oops" has two o's in it. :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94235 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 21:16:37 +00:00
Doug MacEachern
948cab95a4 break SSL_CTX initialization into ssl_init_ctx function
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94234 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 21:14:49 +00:00
Doug MacEachern
bbd6a5e76f (starting to break apart the init code into smaller, generic functions,
preparing for proxy support)

break out verify code into ssl_init_verify function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94233 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 21:07:08 +00:00
William A. Rowe Jr
05ae021cfd Clear up a const warning, and recognize some arrays by changing the
variable names to the plural [rather than aszFoo, which I hope continues
  to be cleaned up as folks have time.]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93982 13f79535-47bb-0310-9956-ffa450edef68
2002-03-17 17:32:24 +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
e89fcb92f1 use ssl_asn1_keystr
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93913 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 18:59:56 +00:00
Doug MacEachern
9432ed4273 use ssl_asn1_table_keyfmt() function and only format each (rsa,dsa)
lookup key once, rather than twice.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93911 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 18:51:35 +00:00
Doug MacEachern
9dbc0c3442 couple o minor style/log fixos
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93896 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 05:05:51 +00:00
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
e38e20775e switch to ptemp pool for ssl_pphrase_Handle
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93894 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 04:49:23 +00:00
Doug MacEachern
22b44bf05c only call: ssl_rand_seed(s, p, SSL_RSCTX_STARTUP, "Init: ");
once at startup.  if there is value in calling it more than once at
startup, it should be done explicitly rather than hidden in
ssl_tmp_keys_init().

switch to ptemp pool when calling ssl_rand_seed() at startup.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93893 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 04:38:35 +00:00