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

137 Commits

Author SHA1 Message Date
Stefan Fritsch
1951a037bf More cleanup: Expand tabs and some more indentation fixes
No functional change


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +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
63e02b35ac Properly fill in the SSL_{CLIENT,SERVER}_V_{START,END} and
SSL_CLIENT_V_REMAIN variables for certs whose notBefore or
notAfter fields use GeneralizedTime encodings.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1170631 13f79535-47bb-0310-9956-ffa450edef68
2011-09-14 14:02:28 +00:00
Kaspar Brand
de33f8ce04 ssl_var_lookup_ssl_cert_dn_oneline(): properly deal with empty DNs
(BIO_read might return -1 in such a case)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166181 13f79535-47bb-0310-9956-ffa450edef68
2011-09-07 13:47:07 +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
Kaspar Brand
1eb818742f Drop support for the RSA BSAFE SSL-C toolkit from configure,
and remove #ifdef'ed code from mod_ssl and ab where applicable.

Consensus for dropping support for SSL/TLS toolkits other
than OpenSSL was reached on dev@httpd in June 2010 (message
with ID <20100602162310.GA11156@redhat.com> and follow-ups).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1154683 13f79535-47bb-0310-9956-ffa450edef68
2011-08-07 10:29:09 +00:00
Stefan Fritsch
481fac5ce2 Make the SERVER_NAME variable include [ ] for literal IPv6 addresses, as
mandated by RFC 3875

PR: 26005


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147614 13f79535-47bb-0310-9956-ffa450edef68
2011-07-17 13:56:28 +00:00
Joe Orton
32c4496dd3 * modules/ssl/ssl_private.h: Drop some redundant/unused macros; pick
up stdlib.h.

* modules/ssl/ssl_engine_pphrase.c (ssl_pphrase_Handle),
  modules/ssl/ssl_engine_vars.c: Stop pretending mod_ssl has a version
  independent of the rest of the server.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082202 13f79535-47bb-0310-9956-ffa450edef68
2011-03-16 16:51:46 +00:00
Stefan Fritsch
7403827278 Change the format of the SSL_{CLIENT,SERVER}_{I,S}_DN variables
to be RFC 2253 compatible, convert non-ASCII characters to UTF8, and 
escape other special characters with backslashes. The old format can
still be used with the LegacyDNStringFormat argument to SSLOptions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1054323 13f79535-47bb-0310-9956-ffa450edef68
2011-01-01 23:56:24 +00:00
Stefan Fritsch
b93e49391b Rename ap_expr's typedef names:
ap_expr            ->  ap_expr_t
ap_expr_parse_ctx  ->  ap_expr_parse_ctx_t
ap_expr_eval_ctx   ->  ap_expr_eval_ctx_t
ap_expr_lookup_fn  ->  ap_expr_lookup_fn_t
ap_expr_node_op    ->  ap_expr_node_op_e


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1042146 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 11:22:30 +00:00
Stefan Fritsch
35cdba6976 Replace ap_expr with a parser derived from mod_ssl's parser. Make mod_ssl use
the new parser. Rework ap_expr's public interface and provide hooks for modules
to add variables and functions.

The Netware and Windows build files still need to be adjusted


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032073 13f79535-47bb-0310-9956-ffa450edef68
2010-11-06 14:31:16 +00:00
Stefan Fritsch
a8a2cd0164 Improve error message if client cert verification fails
PR: 50093
Submitted by: Lassi Tuura <lat cern ch>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1026703 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 22:17:44 +00:00
Stefan Fritsch
d9d061ce5d Split ENV: handling between the request_rec section and the
non-request_rec/conn_rec section. This makes the code fit the
comments.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1001795 13f79535-47bb-0310-9956-ffa450edef68
2010-09-27 16:07:55 +00:00
Stefan Fritsch
8c04f751a7 fix another null pointer dereference found by clang
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1001757 13f79535-47bb-0310-9956-ffa450edef68
2010-09-27 14:34:29 +00:00
Guenter Knauf
f27014e294 fixed const for d2i_ASN1_type_bytes() usage.
Not sure if 0.9.8 is correct, but checked that 0.9.7m doesnt have const.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@965311 13f79535-47bb-0310-9956-ffa450edef68
2010-07-18 22:49:59 +00:00
Ruediger Pluem
45548d26fd * Fix compiler warning about "incompatible pointer type"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@949676 13f79535-47bb-0310-9956-ffa450edef68
2010-05-31 07:20:21 +00:00
Joe Orton
baf08c7f66 Fix handling of extensions with types not known to OpenSSL in
PeerExtList(); parse the value as a string primitive, or else fail,
rather than rendering the raw DER blob as a string regardless of the
type:

* modules/ssl/ssl_engine_vars.c: (dump_extn_value): New function.
  (ssl_ext_list): Use it; tweak error message and free the OID object
  (thanks to drh for spotting this last issue way back).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@946240 13f79535-47bb-0310-9956-ffa450edef68
2010-05-19 15:55:21 +00:00
Joe Orton
ade83fa285 * modules/ssl/ssl_engine_vars.c (ssl_var_lookup_ssl): Add
SSL_SECURE_RENEG variable to indicate support for secure reneg.

* modules/ssl/ssl_engine_kernel.c (ssl_hook_Fixup_vars): Export
  SSL_SECURE_RENEG in the default set of variable.s


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@906057 13f79535-47bb-0310-9956-ffa450edef68
2010-02-03 14:11:19 +00:00
Guenter Knauf
7bdc3a4ceb fixed compatibility to Openssl < 0.9.7g.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@819245 13f79535-47bb-0310-9956-ffa450edef68
2009-09-27 02:54:07 +00:00
Graham Leggett
df83bf1ef7 Make sure the NULL terminator of the array is consistent with the other
elements in the array.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@813165 13f79535-47bb-0310-9956-ffa450edef68
2009-09-09 23:12:15 +00:00
Joe Orton
abb49b2202 * modules/ssl/ssl_engine_vars.c (ssl_var_lookup_ssl_cert_dn_rec): Map
the _UID variable to NID_userId, where defined by OpenSSL.

PR: 45107
Submitted by: Michael Ströder <michael stroeder.com>,
     Peter Sylvester <peter.sylvester edelweb.fr>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@787683 13f79535-47bb-0310-9956-ffa450edef68
2009-06-23 14:10:06 +00:00
Sander Temme
274263a214 Expose whether a request was served over an Initial or Resumed SSL session to the environment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@779005 13f79535-47bb-0310-9956-ffa450edef68
2009-05-27 05:41:07 +00:00
Ruediger Pluem
01cc7f1069 * The state vinfo doesn't matter here: no client verification done at all.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@768501 13f79535-47bb-0310-9956-ffa450edef68
2009-04-25 09:28:21 +00:00
Sander Temme
e171af3118 The development trunk of OpenSSL has tightened up the type safety of the STACK construct
and the functions that manipulate it.  Make httpd trunk compile against OpenSSL HEAD
as well as OpenSSL 0.9.8j.  Also, get rid of some warnings.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@748396 13f79535-47bb-0310-9956-ffa450edef68
2009-02-27 05:16:18 +00:00
Joe Orton
778a79de65 Improve mod_ssl's environment variable extraction to correctly handle
DNs with duplicate tags:

* modules/ssl/ssl_engine_vars.c:
  Augment the ssl_var_lookup_ssl_cert_dn_rec table with a flag
  to indicate whether RDNs of the given NID should be extracted
  to the environment.
  (extract_dn, modssl_var_extract_dns): New functions.

* modules/ssl/ssl_private.h (modssl_var_extract_dns): Add prototype.

* modules/ssl/ssl_engine_kernel.c: Remove SSL_*_DN_ from the list
  of variables to insert into the environment.
  (ssl_hook_Fixup): Use modssl_var_extract_dns to insert the
  SSL_*_DN_ variables efficiently and accurately, handling
  certs with duplicate RDN tags correctly.

PR: 45875


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724717 13f79535-47bb-0310-9956-ffa450edef68
2008-12-09 14:41:21 +00:00
Guenter Knauf
495ec49226 Restructured server name indication support (PR 34607);
added missing client cert support.
Submitted by: Kaspar Brand <asfbugz velox.ch>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@611216 13f79535-47bb-0310-9956-ffa450edef68
2008-01-11 16:04:26 +00:00
Joe Orton
748681d558 * modules/ssl/ssl_engine_vars.c (ssl_var_register): Take a pool
argument; determine library version strings once at startup.
(ssl_var_lookup_ssl_version): Drop 'pp' argument; use new global
variables rather than modifying process-global state in a function
which must be thread-safe.  (all callers changed)

* modules/ssl/mod_ssl.c (ssl_register_hooks): Pass pool to
  ssl_var_register.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@591384 13f79535-47bb-0310-9956-ffa450edef68
2007-11-02 16:12:42 +00:00
William A. Rowe Jr
9f3b705804 Resolve storage of process-lifespan version strings for OpenSSL,
while using request-lifespan copies for manipulation.

Reviewed by RPleum, ZHar'El



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574884 13f79535-47bb-0310-9956-ffa450edef68
2007-09-12 10:47:02 +00:00
Joe Orton
ea188b0032 * modules/ssl/ssl_engine_vars.c (ssl_var_lookup_ssl_version): constify
where possible.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@520839 13f79535-47bb-0310-9956-ffa450edef68
2007-03-21 11:08:14 +00:00
William A. Rowe Jr
95f79e87b6 *) adds compile-time/run time SSL-C version support
*) simplify a ton of overly-verbose legacy code
*) split the compiled-against v.s. runtime library
*) precache the results of the version string touchup



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@520701 13f79535-47bb-0310-9956-ffa450edef68
2007-03-21 01:55:29 +00:00
Jeff Trawick
743a621e8d Replace ap_get_server_version with ap_get_server_banner() and
ap_get_server_description().

High-level summary:

The full server version information is now included in the error log at
startup as well as server status reports, irrespective of the setting
of the ServerTokens directive.

Third-party modules must now use ap_get_server_banner() or 
ap_get_server_description() in place of ap_get_server_version().



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@440337 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 13:08:15 +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
Joe Orton
1ac93b6bd6 * modules/ssl/ssl_engine_vars.c (ssl_var_lookup_ssl_cert_dn): Fix gcc
4.x different-pointer-signedness warning.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@290136 13f79535-47bb-0310-9956-ffa450edef68
2005-09-19 12:26:36 +00:00
David Reid
42b3715533 - remove ssl_ext_lookup and replace it with ssl_ext_list
- change ssl_expr_eval_oid to use ssl_ext_list

This change provides for a singfle function that provides an array of all
values from a certificate that match a given extension and removes the
duplictaed code that was present.

Reviewed by: Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@289444 13f79535-47bb-0310-9956-ffa450edef68
2005-09-16 09:03:49 +00:00
William A. Rowe Jr
340df9ce2f Add SSL_COMPRESS_METHOD variable (included in +StdEnvVars) to note
the negotiated compression.

Reviewed by: wrowe, Maxime Petazzoni
Submitted by: Georg v. Zezschwitz <gvz 2scale.de>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@209469 13f79535-47bb-0310-9956-ffa450edef68
2005-07-06 15:16:28 +00:00
William A. Rowe Jr
cdea6cc2b9 Second fat-fingered typo in 24 hrs. Balance parens, this now compiles.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@157947 13f79535-47bb-0310-9956-ffa450edef68
2005-03-17 17:30:20 +00:00
William A. Rowe Jr
f9587e4e59 Clean up emit for size truncation. Division here ensures we fit nicely.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@157946 13f79535-47bb-0310-9956-ffa450edef68
2005-03-17 17:06:12 +00:00
Joe Orton
a10288a95d * modules/ssl/mod_ssl.h: Add ssl_ext_lookup optional hook declaration.
* modules/ssl/ssl_engine_vars.c (ssl_ext_lookup): New function.
(ssl_var_register): Register optional function.

* modules/ssl/ssl_private.h (ssl_ext_lookup): Add prototype.

Submitted by: David Reid, Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153933 13f79535-47bb-0310-9956-ffa450edef68
2005-02-15 12:39:45 +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
William A. Rowe Jr
d962fcfc8b FINALLY Correct ap_http_method()! It is NOT a method, it's a SCHEME!
Bumped mmn, and ap module cookie, for this function rename.

  It's not a deprecation, as ap_http_method would be a lovely function
  name sometime in the future: to determine what the function name implies.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123882 13f79535-47bb-0310-9956-ffa450edef68
2005-01-02 05:33:44 +00:00
Jean-Frederic Clere
1a3ce1a62c Use the right length.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105354 13f79535-47bb-0310-9956-ffa450edef68
2004-09-30 15:59:17 +00:00
Joe Orton
837beb6730 * modules/ssl/ssl_engine_vars.c: Map "UID" suffix to the same OID
(2.5.4.45) for old and new versions of OpenSSL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105244 13f79535-47bb-0310-9956-ffa450edef68
2004-09-22 11:34:53 +00:00
Joe Orton
5afedd0422 * modules/ssl/ssl_engine_vars.c (ssl_var_lookup_ssl_cert_remain): New
function.  (ssl_var_lookup_ssl_cert): Support _V_REMAIN suffix for
SSL_{SERVER,CLIENT} as number of days until certificate expires.

* modules/ssl_engine_kernel.c: Export SSL_CLIENT_V_REMAIN if
+StdEnvVars is configured.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104700 13f79535-47bb-0310-9956-ffa450edef68
2004-08-18 11:05:22 +00:00
Martin Kraemer
97e2af662c Use the correct Apache-2.x EBCDIC conversion function (not the old apache-1.3 routine)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104082 13f79535-47bb-0310-9956-ffa450edef68
2004-06-29 14:06:08 +00:00
Joe Orton
4c36ea2ab5 * modules/ssl/ssl_engine_vars.c (ssl_var_lookup,
ssl_var_lookup_ssl_cipher): Use apr_itoa instead of psprintf %d.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102855 13f79535-47bb-0310-9956-ffa450edef68
2004-03-04 20:44:13 +00:00
Joe Orton
919194363c * modules/ssl/ssl_engine_vars (ssl_var_lookup): const'ify result and
drop a bunch of casts; use apr_table_get directly in place of
ssl_var_lookup_header.
(ssl_var_lookup_header): Remove function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102854 13f79535-47bb-0310-9956-ffa450edef68
2004-03-04 20:39:53 +00:00
Joe Orton
0015ef74b5 * modules/ssl/ssl_engine_vars (ssl_var_lookup): Optimise such that
lookup of SSL_* variables (the common case) requires 2 rather than 29
strcasecmp calls before getting to ssl_var_lookup_ssl().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102851 13f79535-47bb-0310-9956-ffa450edef68
2004-03-04 13:42:09 +00:00
Joe Orton
0f7f4106a3 * modules/ssl/mod_ssl.h: Declare ssl_is_https optional function.
* modules/ssl/ssl_engine_vars (ssl_is_https): New function.
(ssl_var_register): Register it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102850 13f79535-47bb-0310-9956-ffa450edef68
2004-03-04 13:06:54 +00:00