Commit Graph

1478 Commits

Author SHA1 Message Date
d8afd98367 Add optional _RAW suffix to SSL_*_DN_xx attribute names, allowing
users to convert an attribute value without conversion to UTF-8.  (A
public CA has issued certs with attributes tagged as the wrong ASN.1
string types.)

* modules/ssl/ssl_util_ssl.c (asn1_string_convert): Rename from
  asn1_string_to_utf8; add raw argument. Reimplement _to_utf8 as
  macro.
  (modssl_X509_NAME_ENTRY_to_string): Add raw argument.

* modules/ssl/ssl_engine_vars.c (ssl_var_lookup_ssl_cert_dn): Use raw
  string conversion if _RAW suffix is present in DN component.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1811976 13f79535-47bb-0310-9956-ffa450edef68
2017-10-12 15:11:50 +00:00
45e9483634 mod_ssl: fix add_policy() w.r.t. OPENSSL_NO_COMP. PR 61592.
Proposed by: Bernard Spil <brnrd freebsd.org>
Reviewed by: ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1811475 13f79535-47bb-0310-9956-ffa450edef68
2017-10-08 11:40:03 +00:00
9a8adef617 On the trunk:
mod_ssl: make the new module flag used.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1809713 13f79535-47bb-0310-9956-ffa450edef68
2017-09-26 08:22:52 +00:00
a40e705b5e mod_ssl: follow up to r1809302.
Make use of AP_MODULE_FLAG_ALWAYS_MERGE.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1809303 13f79535-47bb-0310-9956-ffa450edef68
2017-09-22 11:59:57 +00:00
b5bdda4073 * modules/ssl/ssl_private.h: Remove unused macros.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1809297 13f79535-47bb-0310-9956-ffa450edef68
2017-09-22 10:33:08 +00:00
f2311ccaad On the trunk:
mod_ssl: unshare SSLSrvConfigRec instances between base server and virtual hosts. This avoids
     overwrites of later initializattions (vhost_id), selective disables by "SSLEngine addr-list"
     and certificate/key pickup from mod_md. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1809037 13f79535-47bb-0310-9956-ffa450edef68
2017-09-20 14:41:25 +00:00
c6535beda3 On the trunk:
mod_ssl: adding ssl_policies.h[.in] for policy cipher/protocol definitions. Use 
     update_policies.py to update manually from Mozilla JSON definitions at
     https://statics.tls.security.mozilla.org/server-side-tls-conf.json



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1808335 13f79535-47bb-0310-9956-ffa450edef68
2017-09-14 13:01:29 +00:00
cdf4efe3dd updated mod_ssl log tags
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1808244 13f79535-47bb-0310-9956-ffa450edef68
2017-09-13 14:20:16 +00:00
162fa860dc On the trunk:
mod_ssl: properly initializing server for fallback certificates provided by mod_md.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1808122 13f79535-47bb-0310-9956-ffa450edef68
2017-09-12 14:27:47 +00:00
e533d70fe1 * We need i if we have HAVE_SSL_CONF_CMD defined
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807994 13f79535-47bb-0310-9956-ffa450edef68
2017-09-11 06:15:58 +00:00
0a985dfefb * Silence compiler warning and remove unused variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807993 13f79535-47bb-0310-9956-ffa450edef68
2017-09-11 06:02:14 +00:00
55956ee619 On the trunk:
mod_ssl: Extending SSLEngine to alternatively get a list of add:port spec as used in VirtualHost.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807709 13f79535-47bb-0310-9956-ffa450edef68
2017-09-08 10:29:53 +00:00
67579cce40 On the trunk:
mod_ssl: using improved mod_md md_get_certificate optional function when available


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807232 13f79535-47bb-0310-9956-ffa450edef68
2017-09-04 14:33:18 +00:00
c9f60810cf On the trunk:
mod_md: v0.8.1 from github, new feats in CHANGES



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1806939 13f79535-47bb-0310-9956-ffa450edef68
2017-09-01 12:11:38 +00:00
597bc9e766 On the trunk:
mod_ssl: not using SSLV3 constant that would define what we mean by SSL version 3 if openssl does not know about SSL version 3. Then we pretend to not know about it either.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1805186 13f79535-47bb-0310-9956-ffa450edef68
2017-08-16 12:43:41 +00:00
e4431e60a4 On the trunk:
mod_ssl: adding SSLPolicy and SSLProxyPolicy directives plus documentation.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1805182 13f79535-47bb-0310-9956-ffa450edef68
2017-08-16 12:22:28 +00:00
b14a732d6f Fix typo in log message.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1805163 13f79535-47bb-0310-9956-ffa450edef68
2017-08-16 09:50:39 +00:00
a68a39d321 log tags for mod_ssl changes and new mod_md
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1804531 13f79535-47bb-0310-9956-ffa450edef68
2017-08-09 13:59:26 +00:00
266f140fa8 mod_ssl uses now mod_md header file for optional function declaration
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/trunk-md@1804422 13f79535-47bb-0310-9956-ffa450edef68
2017-08-08 13:33:45 +00:00
e7a858c2bd branch for integrating mod_md into trunk
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/trunk-md@1804087 13f79535-47bb-0310-9956-ffa450edef68
2017-08-04 09:52:04 +00:00
31a4103652 mod_ssl, ab: compatibility with LibreSSL. PR 61184.
LibreSSL defines OPENSSL_VERSION_NUMBER = 2.0, but is not compatible with
all of the latest OpenSSL 1.1 API.

Address this by defining MODSSL_USE_OPENSSL_PRE_1_1_API which is true for
anything but OpenSSL >= 1.1 (for now).

Proposed by: Bernard Spil <brnrd freebsd.org>
Reviewed by: ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1803396 13f79535-47bb-0310-9956-ffa450edef68
2017-07-29 23:05:02 +00:00
36d01334ab mod_ssl: we can't use SSL_COMP_free_compression_methods() if OPENSSL_NO_COMP
is defined.  PR 61206.

Submitted by: Michael Schlenker <msc contact.de>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1803392 13f79535-47bb-0310-9956-ffa450edef68
2017-07-29 20:35:56 +00:00
62e4ea6d2c Revert r1798456
* For the time being keep on caching OCSP_RESPONSE_STATUS_TRYLATER. The effect can be limited by setting SSLStaplingErrorCacheTimeout.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1798460 13f79535-47bb-0310-9956-ffa450edef68
2017-06-12 13:15:33 +00:00
f926fe46ee * Only report success, if had real one.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1798457 13f79535-47bb-0310-9956-ffa450edef68
2017-06-12 12:53:38 +00:00
a9aa6a82a4 * Do not cache OCSP_RESPONSE_STATUS_TRYLATER.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1798456 13f79535-47bb-0310-9956-ffa450edef68
2017-06-12 12:49:06 +00:00
3bd26f8c6b * Mark OCSP_RESPONSE_STATUS_TRYLATER as error response
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1798455 13f79535-47bb-0310-9956-ffa450edef68
2017-06-12 12:48:30 +00:00
11250ebd61 mod_ssl: fix ctx passed to ssl_io_filter_error()
Consistently pass the expected bio_filter_in_ctx_t
to ssl_io_filter_error(). 

Submitted By: Yann Ylavic
CVEID: CVE-2017-3169


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1796343 13f79535-47bb-0310-9956-ffa450edef68
2017-05-26 21:09:32 +00:00
f90daed529 Merge fix branch for PR60947.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1791849 13f79535-47bb-0310-9956-ffa450edef68
2017-04-19 02:42:43 +00:00
b05388b5e5 ssl_util.c: add APLOGNOs
Start from 10027 to match the current trunk (r1791845), which will be
merged into shortly.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/trunk-openssl-threadid@1791848 13f79535-47bb-0310-9956-ffa450edef68
2017-04-19 02:38:20 +00:00
bac77f2026 ssl_util.c: log which threadid callback is in use
This should help during testing and debugging. Use APLOG_NOTICE for now,
until we fix PR60999, so that people can actually see the log message.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/trunk-openssl-threadid@1791847 13f79535-47bb-0310-9956-ffa450edef68
2017-04-19 02:23:48 +00:00
6f10517a08 mod_ssl_ct: fix return values for custom extension callback
This is most likely a follow-up to r1628833.

At some point during the OpenSSL 1.0.2 beta, the contract for custom
extension callbacks changed from "returning -1 skips the extension" to
"returning -1 will issue a TLS fatal alert". This caused mod_ssl_ct to
abort TLS connections that it intended to ignore. Zero is the correct
return value for "do nothing" in 1.0.2.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1791845 13f79535-47bb-0310-9956-ffa450edef68
2017-04-19 01:32:58 +00:00
e8c348af4a PR60947: try to warn affected users...
...but at the moment, this won't actually get logged unless you're
running in debug mode, due to an unrelated bug (PR60999).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/trunk-openssl-threadid@1791733 13f79535-47bb-0310-9956-ffa450edef68
2017-04-18 00:19:34 +00:00
7b2bdcea91 PR60947: avoid CRYPTO_THREADID_set_callback() if possible
CRYPTO_THREADID_set_callback() is write-once, so if mod_ssl is unloaded
and reloaded into a different address, we'll crash if OpenSSL wasn't
also unloaded and reloaded at the same time. This can happen if another
module or library is using OpenSSL as well.

- OpenSSL 1.1.0 isn't affected.
- Certain platforms (Windows, BeOS, and POSIX-compliant systems) can
  make use of the default THREADID callback in OpenSSL 1.0.x.
- If the deprecated CRYPTO_set_id_callback() is available, we can use it
  instead of CRYPTO_THREADID_set_callback().

Otherwise, we have to fall back to CRYPTO_THREADID_set_callback(), but
hopefully that applies to a small percentage of users at this point.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/trunk-openssl-threadid@1791732 13f79535-47bb-0310-9956-ffa450edef68
2017-04-18 00:19:32 +00:00
d06424f116 ssl_util.c: add a couple explanatory comments
Mark the things that are busted.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/trunk-openssl-threadid@1791731 13f79535-47bb-0310-9956-ffa450edef68
2017-04-18 00:19:30 +00:00
7f59369309 ssl_util.c: pull up duplicated code in ssl_util_thr_id()
Should make it easier to see what's going on in the next few changes.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/trunk-openssl-threadid@1791730 13f79535-47bb-0310-9956-ffa450edef68
2017-04-18 00:19:27 +00:00
cee2df66f0 mod_ssl: follow up to r1781575
Fix SSLOCSPNoVerify merging, and while at it capitalize Verify as suggested
by wrowe.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1788430 13f79535-47bb-0310-9956-ffa450edef68
2017-03-24 12:40:27 +00:00
dadde98190 On the trunk:
mod_ssl: treat SSLConnRecs as const during var lookups.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1787605 13f79535-47bb-0310-9956-ffa450edef68
2017-03-19 10:32:53 +00:00
84d078e64c Thanks to Rüdiger, Yann and Jacob for catches and verification
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783438 13f79535-47bb-0310-9956-ffa450edef68
2017-02-17 17:39:59 +00:00
08e986a8aa Revert it part r1783317, 'avoid _free()ing NULL references.'
OpenSSL team is committed to preserving safe _free(NULL) behaviors, and the
overhead of these calls in the context setup path is inconsequential. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783434 13f79535-47bb-0310-9956-ffa450edef68
2017-02-17 17:32:26 +00:00
fee7329281 Revert r1783310 'Preserve OpenSSL 1.0.2 compatibility, following up on r1783305'
This was our first compatibility pattern but we are not preserving it, it seems
irrelevant since the death of 16 bit Windows object files.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783432 13f79535-47bb-0310-9956-ffa450edef68
2017-02-17 17:29:51 +00:00
5004e381b2 Fix #cpp bug in prior commit, follow up to r1783317.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783318 13f79535-47bb-0310-9956-ffa450edef68
2017-02-16 22:30:50 +00:00
915c1b7087 Avoid unnecessary code (the deprecation macro wrapper itself emits unused args
warnings) in OpenSSL 1.1.0 and avoid _free()ing NULL references.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783317 13f79535-47bb-0310-9956-ffa450edef68
2017-02-16 22:27:24 +00:00
342bc8e512 Preserve OpenSSL 1.0.2 compatibility, following up on r1783305
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783310 13f79535-47bb-0310-9956-ffa450edef68
2017-02-16 21:41:55 +00:00
561b273ca8 Fix OpenSSL 1.1.0 breakage in r1781575; BIO_s_file_internal() is gone.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783305 13f79535-47bb-0310-9956-ffa450edef68
2017-02-16 21:26:34 +00:00
873119e7d8 Remove unused variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1781687 13f79535-47bb-0310-9956-ffa450edef68
2017-02-04 16:51:59 +00:00
43a1396988 mod_ssl: don't depend on the next output filters to cleanup the passed out
brigades.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1781582 13f79535-47bb-0310-9956-ffa450edef68
2017-02-03 17:32:32 +00:00
f6146b725c Add Configuration for trusted OCSP responder certificates
Fix for PR 46037


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1781575 13f79535-47bb-0310-9956-ffa450edef68
2017-02-03 16:19:17 +00:00
5054dfbb96 mod_ssl: follow up to r1740928: fix memory leaks from merged proxy_ctx.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1781313 13f79535-47bb-0310-9956-ffa450edef68
2017-02-01 21:25:26 +00:00
c98a1699b0 mod_ssl: follow up to r1781187.
Address SSL_CTX leak in (merged) proxy_ctx.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1781312 13f79535-47bb-0310-9956-ffa450edef68
2017-02-01 21:23:17 +00:00
7e95870837 mod_ssl: revert r1781299 r1781188.
Need to separate follow up related to r1740928 and co from the one related to
r1781187.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1781311 13f79535-47bb-0310-9956-ffa450edef68
2017-02-01 21:17:20 +00:00