1
0
mirror of https://github.com/apache/httpd.git synced 2025-06-03 10:42:03 +03:00

59 Commits

Author SHA1 Message Date
Ben Laurie
20c7ffc756 Layout and compiler warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@424735 13f79535-47bb-0310-9956-ffa450edef68
2006-07-23 13:17:28 +00:00
Ben Laurie
892785ce39 Add PKCS#7 support.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@424707 13f79535-47bb-0310-9956-ffa450edef68
2006-07-23 10:55:07 +00:00
Roy T. Fielding
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Colm MacCarthaigh
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
Jim Jagielski
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
Jim Jagielski
5d2fae4818 No functional change: simple detabbing of indented code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332305 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:05:51 +00:00
Justin Erenkrantz
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +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
Joe Orton
825005a089 * modules/ssl/ssl_engine_pphrase.c (ssl_pphrase_Handle): Wording
tweaks.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102747 13f79535-47bb-0310-9956-ffa450edef68
2004-02-22 10:27:21 +00:00
Joe Orton
1609950077 * modules/ssl/ssl_engine_pphrase.c: Note that the ERR_clear_error()
call is not merely a cosmetic fix in light of PR 21160.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102628 13f79535-47bb-0310-9956-ffa450edef68
2004-02-10 12:17:44 +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
bc1c3f3d88 Fix a cosmetic issue where OpenSSL 0.9.7 will dump the error stack
during pass phrase entry.

* ssl_engine_pphrase.c (ssl_pphrase_Handle): Clear the OpenSSL error
stack before reading the private key.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101515 13f79535-47bb-0310-9956-ffa450edef68
2003-10-22 15:04:11 +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
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
723742b066 These emits occur mainline, outside of the pphrase_callback, so we never
opened readtty or writetty.  But they are absolute failures, nothing the
  user could do to deal with them.  They are logged in the ssl vhost's error
  log.

  In this case, I forgot my SSLCertificateKeyFile, so the server never
  tried the callback.  writetty wasn't initialized, so we segfaulted.

  This segfault is due to misconfig, not to the dialog with the user.
  This is the easiest fix (easier to read, too), but we shouldn't need
  to worry too much that the release is tagged.  If we retag, fine, then
  grab it, but it only addresses a config problem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95734 13f79535-47bb-0310-9956-ffa450edef68
2002-06-17 19:39:19 +00:00
Cliff Woolley
ae5d4fde8d This definitely gets the award for least useful error message of the month.
Not only should it just say "can't do that on win32," which is after all
the bottom line, it was spitting out openssl error messages which were
totally useless.  Eg:

[30/May/2002 17:31:17 05760] [error] Init: PassPhraseDialog BuiltIn not
supported in server private key from file
F:/Apache/Apache2/conf/ssl/secure.key (OpenSSL library error follows)
[30/May/2002 17:31:17 05760] [error] OpenSSL: error:0D084069:asn1
encoding routines:d2i_ASN1_SET:bad tag
[30/May/2002 17:31:17 05760] [error] OpenSSL: error:0D09D082:asn1
encoding routines:d2i_RSAPrivateKey:parsing
[30/May/2002 17:31:17 05760] [error] OpenSSL: error:0D09B00D:asn1
encoding routines:d2i_PrivateKey:ASN1 lib

Which is essentially saying "OpenSSL couldn't read your private key because
it was encrypted, and we can't get the passphrase the way you asked us to
on this platform."


Brought to my attention by the inquiry of:  Chris Hsiang <chsiang@ivivos.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95415 13f79535-47bb-0310-9956-ffa450edef68
2002-05-30 22:39:08 +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
Jeff Trawick
8e3f904286 tweak an error message for readability
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95135 13f79535-47bb-0310-9956-ffa450edef68
2002-05-16 10:45:22 +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
Paul J. Reder
4a243a466e Fix a case where an invalid pass phrase is entered and an
error message is given, but the prompt is not shown again.
This left the user in an ambiguous state.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94896 13f79535-47bb-0310-9956-ffa450edef68
2002-05-01 19:28:52 +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
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
f3e92e1cde bringing back MOD_SSL_VERSION macro, define it to AP_SERVER_BASEVERSION
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94231 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 19:38:05 +00:00
Doug MacEachern
309a7b6e84 adjustment for sslc where its PEM_read_bio_PrivateKey does not take a
callback arg.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94230 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 19:11:11 +00:00
Doug MacEachern
367fcf3016 static-ize {write,read}tty variables
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94227 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 18:46:49 +00:00
Jeff Trawick
3400f03621 the mod_ssl provided with Apache >= 2.0 no longer has an independent
version number


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94111 13f79535-47bb-0310-9956-ffa450edef68
2002-03-22 00:59:23 +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
Jeff Trawick
2df1a02f72 deal with the rename of kill_after_timeout to APR_KILL_AFTER_TIMEOUT
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93940 13f79535-47bb-0310-9956-ffa450edef68
2002-03-14 22:19:14 +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
98786b66c7 use ssl_asn1_table_keyfmt() function
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93910 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 18:50:17 +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
3b380d5848 replace ssl_ds_array usage with apr_array_header_t
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93890 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 03:59:43 +00:00
Doug MacEachern
cf13aec945 support reuse of encrypted DSA keys on restart
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93799 13f79535-47bb-0310-9956-ffa450edef68
2002-03-08 18:16:41 +00:00
Doug MacEachern
b89f15f2f8 reuse existing private key if possible for all SSLPassPhraseDialog
types, not just builtin.  on win32 for example, a pipe dialog might
allocate a wintty for prompting, which results in 4 prompts at
startup, 2 for each child and 2 within each when httpd "restarts
itself".
update comments on this and wrap them a bit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93679 13f79535-47bb-0310-9956-ffa450edef68
2002-03-03 00:46:07 +00:00
Doug MacEachern
7ba9c34313 always reusing existing private key for given vhost on restarts if key
is encrypted and mtime stamp has not changed.  this prevents getting
prompted twice for passphrase on windows and elsewhere when server is
started with -DNO_DETACH.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93620 13f79535-47bb-0310-9956-ffa450edef68
2002-02-28 01:47:26 +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
William A. Rowe Jr
1fd923c1c7 Introduce PassPhraseDialog 'pipe' mechanism. This builds on DougM's
apr-ization of the 'tty', and changes his naming a bit so we clearly
  identify the pipe-to and pipe-from the user.

  This patch invokes a bidirectional piped dialog to the user.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93607 13f79535-47bb-0310-9956-ffa450edef68
2002-02-27 19:54:07 +00:00
Doug MacEachern
af2dbadb40 change builtin passphrase prompt to use stdout rather than stderr.
and switch to using apr_file api for portability.
stderr has already been redirected to the error_log.
rather than attempting to temporarily rehook it to the terminal,
we print the prompt to stdout before EVP_read_pw_string turns
off tty echo.  which is also more portable.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93586 13f79535-47bb-0310-9956-ffa450edef68
2002-02-27 03:33:38 +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
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
William A. Rowe Jr
44cfd7a508 It is absolutely invalid practice to test 'prot' bits to determine if a
file is readable.  The only acceptable means of testing readability is to
  open it for reading, due to discrepancies between permissions, DACLs and
  SACLS.  Even Linux hackers are gonna need to learn that lesson if they
  plan to do any DOD or Gov work once DACL-enhanced Linux is adopted.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91516 13f79535-47bb-0310-9956-ffa450edef68
2001-10-17 00:03:22 +00:00
Cliff Woolley
eec989f888 sc->szPassPhraseDialogPath is now constified, so we have to use
ap_strchr_c instead of strchr (which == ap_strchr on my system).

Submitted by:	Ryan Bloom


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