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

53 Commits

Author SHA1 Message Date
Yann Ylavic
316aea784d mod_ssl: add compatibility with OpenSSL 3.0.0
Wrappers around deprecated API:
* X509_STORE_load_locations() => modssl_X509_STORE_load_locations(),
* CTX_load_verify_locations() => modssl_CTX_load_verify_locations(),
* ERR_peek_error_line_data()  => modssl_ERR_peek_error_data(),
* DH_bits(dh)                 => BN_num_bits(DH_get0_p(dh)).

Provide a compatible version of ssl_callback_SessionTicket() which does not
use the deprecated HMAC_CTX and HMAC_Init_ex(), replaced by EVP_MAC_CTX and
EVP_MAC_CTX_set_params() respectively. This requires adapting struct
modssl_ticket_key_t to replace hmac_secret[] with OSSL_PARAM mac_params[],
created once at load time still.
The callback is registered by SSL_CTX_set_tlsext_ticket_key_evp_cb() instead
of SSL_CTX_set_tlsext_ticket_key_cb().

Since BIO_eof() may now be called openssl-3 state machine, the never-called
assertion in bio_filter_in_ctrl() does not hold anymore, and we have to
handle BIO_CTRL_EOF. For any other cmd, we continue to AP_DEBUG_ASSERT(0) and
log an error, yet the return value is changed from -1 to 0 which is the usual
unhandled value.

Note that OpenSSL 3.0.0 is still in alpha stage as of now, the API shouldn't
change though, neither breakage to 1.x.x API.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876934 13f79535-47bb-0310-9956-ffa450edef68
2020-04-24 16:09:02 +00:00
Joe Orton
baaf6b9c49 * modules/ssl/ssl_engine_log.c (ssl_log_cert_error): Use string
length returned by apr_vsnprintf.  No functional change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1867569 13f79535-47bb-0310-9956-ffa450edef68
2019-09-26 09:17:58 +00:00
Stefan Sperling
1e4c1e7fd2 mod_ssl namespacing: SSL_X509_NAME_to_string -> modssl_X509_NAME_to_string
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677153 13f79535-47bb-0310-9956-ffa450edef68
2015-05-01 14:34:38 +00:00
Kaspar Brand
7d402a24ec Address a todo listed in
https://mail-archives.apache.org/mod_mbox/httpd-dev/200205.mbox/%3CPine.LNX.4.33.0205292300380.27841-100000%40mako.covalent.net%3E
"init functions should return status code rather than ssl_die()"

For diagnostic purposes, ssl_die() is still there, but instead
of abruptly exit(1)ing, it will return APR_EGENERAL to the
ssl_init_* callers in ssl_engine_init.c, and these will propagate
the status back to ssl_init_Module.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1544774 13f79535-47bb-0310-9956-ffa450edef68
2013-11-23 12:22:47 +00:00
Stefan Fritsch
8dcffbfbaa abort if BIO_new fails due to lack of memory
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1427456 13f79535-47bb-0310-9956-ffa450edef68
2013-01-01 16:23:28 +00:00
Stefan Fritsch
80ab7f95b9 Pass the server_rec to ssl_die() and use it to log a message to the main error
log, pointing to the appropriate virtual host error log


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1348660 13f79535-47bb-0310-9956-ffa450edef68
2012-06-10 21:00:39 +00:00
Stefan Fritsch
53164d250f Various fixes for log message tags:
- Remove tags in ssl_log_ssl_error() and ssl_log_cert_error()
- Instead add tags to various ssl_log_xerror, ssl_log_cxerror
  calls (ssl_log_rxerror is unused).
- likewise for modssl_proxy_info_log()

- Fix spelling of APLOG_NOERRNO in coccinelle script
- add support for ssl_log_*error and ap_log_cserror

- add some more tags missing due to APLOG_NOERRNO spelling error

- Remove tags from example modules (we don't want people to blindly copy
  those)



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1211680 13f79535-47bb-0310-9956-ffa450edef68
2011-12-07 22:33:35 +00:00
Stefan Fritsch
92e366007c Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Kaspar Brand
693aab21f0 Add ssl_log_xerror() and ssl_log_rxerror(), modeled after ssl_log_cxerror().
Add SSL_X509_NAME_to_string(), which converts an X509 distinguished name
to an RFC 2253 formatted string.
Adapt ssl_log_*error() to make use of SSL_X509_NAME_to_string().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172797 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 20:23:27 +00:00
Kaspar Brand
036e37c4cb we might also see GeneralizedTimes in certs nowadays
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1165060 13f79535-47bb-0310-9956-ffa450edef68
2011-09-04 16:03:38 +00:00
Kaspar Brand
4011df375e Improve ssl_log_cxerror():
Fix logic of APLOG_IS_LEVEL check.
Use X509_NAME_print_ex() instead of deprecated X509_NAME_oneline().
Use i2a_ASN1_INTEGER for printing the serial number.
Add notBefore and notAfter dates to log line.
Check for null cert argument (addresses PR 47408).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157712 13f79535-47bb-0310-9956-ffa450edef68
2011-08-15 05:15:17 +00:00
Kaspar Brand
7bd59fd67a Remove the ssl_toolkit_compat layer, which is no longer needed
after support for non-OpenSSL toolkits has been dropped.

Replace macros by their value proper where feasible, and keep
those definitions in ssl_private.h which depend on specific
OpenSSL versions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1154687 13f79535-47bb-0310-9956-ffa450edef68
2011-08-07 10:34:31 +00:00
Stefan Fritsch
9d791e0e60 Fix some modules to make them compile with per-module loglevels.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951894 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:56:08 +00:00
Ruediger Pluem
9e39ba015a * Store the correct server_rec in the connection record configuration and
adjust the remaining part of mod_ssl to use this server_rec instead of
  c->base_server.

  modules/ssl/ssl_private.h:
  - server_rec member to SSLConnRec struct
  - Add macros to extract data from connection_rec
    mySrvFromConn(c)
    mySrvConfigFromConn(c)
    myModConfigFromConn(c)
  modules/ssl/ssl_engine_io.c
  modules/ssl/ssl_util_ocsp.c
  modules/ssl/ssl_engine_kernel.c
  modules/ssl/mod_ssl.c
  modules/ssl/ssl_engine_log.c
  - Use the new macros to extract data fron connection_rec
    and use the server_rec stored in SSLConnRec instead of
    c->base_server whereever appropriate.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@757463 13f79535-47bb-0310-9956-ffa450edef68
2009-03-23 17:37:38 +00:00
Joe Orton
4545273948 * modules/ssl/ssl_engine_log.c (ssl_log_cxerror): Drop 'peer' from the
log message since the passed-in cert may be e.g. the peer's issuer.

* modules/ssl/ssl_private.h (ssl_log_cxerror): Don't mention the word
  peer here either.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@600486 13f79535-47bb-0310-9956-ffa450edef68
2007-12-03 11:21:02 +00:00
Joe Orton
14fcf5a1bc * modules/ssl/ssl_engine_log.c (ssl_log_cxerror): Log the certificate
serial number along with the subject and issuer names.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@598690 13f79535-47bb-0310-9956-ffa450edef68
2007-11-27 16:57:12 +00:00
Joe Orton
62059cf7c6 * modules/ssl/ssl_engine_log.c (ssl_log_cxerror): New function,
factored out from ssl_callback_SSLVerify.

* modules/ssl/ssl_private: Add prototype.

* modules/ssl/ssl_engine_kernel.c (ssl_callback_SSLVerify): Use it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@597651 13f79535-47bb-0310-9956-ffa450edef68
2007-11-23 12:13:59 +00:00
Joe Orton
69c7c57012 * modules/ssl/ssl_engine_log.c (ssl_log_ssl_error): Improve SSL error
log messages: retrieve and log the "data" string where available,
  drop the redundant error number (always included in the error string
  anyway), and clearly delineate both the "data" and "annotation" from
  the error string itself.

PR: 43889
Submitted by: Dr Stephen Henson <steve openssl.org>, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@597077 13f79535-47bb-0310-9956-ffa450edef68
2007-11-21 13:35:59 +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
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
670b834207 * modules/ssl/ssl_engine_log.c (ssl_log_annotation): const-ify more.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102943 13f79535-47bb-0310-9956-ffa450edef68
2004-03-12 17:14:28 +00:00
Joe Orton
ddecd8ab9e * modules/ssl/ssl_engine_log.c (ssl_log_annotate, ssl_log_annotation,
ssl_log_ssl_error): const-ify annotation strings and simplify
ssl_log_annotation.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102927 13f79535-47bb-0310-9956-ffa450edef68
2004-03-10 21:54:17 +00:00
Joe Orton
f205725d2e * modules/ssl/ssl_engine_log.c (ssl_log_ssl_error): Use %lu to print
an unsigned long.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102856 13f79535-47bb-0310-9956-ffa450edef68
2004-03-04 21:54:09 +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
1a97fbae07 * ssl_engine_log.c (ssl_log_ssl_error): Use the thread-safe
interface for retrieving error strings.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101625 13f79535-47bb-0310-9956-ffa450edef68
2003-10-30 12:15:28 +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
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
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
Cliff Woolley
0db4d51f74 - Sync with modssl 2.8.8-1.3.24
- Also a minor change to add more useful error
  logging for shmcb startup failures


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94875 13f79535-47bb-0310-9956-ffa450edef68
2002-04-30 03:47:31 +00:00
Sander Striker
6e8efec657 Adapt to the rename of apr_explode_localtime to apr_time_exp_lt in APR.
Submitted by: Thom May <thom@planetarytramp.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94631 13f79535-47bb-0310-9956-ffa450edef68
2002-04-13 12:02:38 +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
William A. Rowe Jr
189e3aa081 PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93971 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 19:34:33 +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
Ian Holsman
da35725071 apr-utils rename apr_ansi_time_to_apr_time and
apr_exploded_time_t.

PR:
Obtained from:
Submitted by:	Thom May <thom@planetarytramp.net>
Reviewed by:	Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93733 13f79535-47bb-0310-9956-ffa450edef68
2002-03-06 17:55:38 +00:00
Ryan Bloom
1fc3677924 Use the empty string, not NUL. I should have read my code more closely.
Thanks Cliff for slapping me in the head.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93583 13f79535-47bb-0310-9956-ffa450edef68
2002-02-27 00:58:17 +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
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
040e30d466 dont va_start() in ssl_log() unless we are actually going to log something
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92123 13f79535-47bb-0310-9956-ffa450edef68
2001-11-22 02:58:07 +00:00
William A. Rowe Jr
e2167f16e3 Fix most-bogus ap_server_root_relative() cases. These don't include
the cases where we are trying to ap_server_root_relative() a pipe cmd!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90561 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 18:47:32 +00:00
Ralf S. Engelschall
ca8f54367f Apply mod_ssl MEGA porting patch. This is a cleaned up version of the
latest patches from Madhusudan which makes mod_ssl 95% working inside
Apache 2.0. There is still a lot of more work (both porting and cleanup)
to do be done. See modules/ssl/README for details.

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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89618 13f79535-47bb-0310-9956-ffa450edef68
2001-07-19 16:08:01 +00:00
Ralf S. Engelschall
4a4ce878a4 Axe out EAPI-based SSL_VENDOR stuff.
If we want this later again, we have to do it differently anyway. So,
for now we try to strip down mod_ssl as heavy as possible and hence we
kick out this stuff at all.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89010 13f79535-47bb-0310-9956-ffa450edef68
2001-05-05 15:02:13 +00:00