1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-04 05:42:12 +03:00

395 Commits

Author SHA1 Message Date
45e3cf9511 Hook up PKCS#11 PIN entry through configured passphrase entry method.
* modules/ssl/ssl_engine_pphrase.c: Add wrappers for OpenSSL UI * API
  around passphrase entry.
  (modssl_load_engine_keypair): Take vhost ID and use above rather than
  default OpenSSL UI.

* modules/ssl/ssl_engine_init.c (ssl_init_server_certs): Pass vhost ID.

Submitted by: Anderson Sasaki<ansaski redhat.com>, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1835240 13f79535-47bb-0310-9956-ffa450edef68
2018-07-06 12:01:29 +00:00
275b140280 mod_ssl: build with LibreSSL.
LibreSSL seems to be openssl-1.1 API compatible only in version 2.8 (master).
So use that for MODSSL_USE_OPENSSL_PRE_1_1_API instead of 2.7, the two 2.7
compatibility-exceptions are handled explicitely but overall it's simpler.

Regarding CRYPTO_malloc_init vs OPENSSL_malloc_init, libreSSL uses none, the
former used to be a no-op but depends is LIBRESSL_INTERNAL in latest versions,
while the latter has never been (and will never be) defined. So don't call any
with LibreSSL.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1833598 13f79535-47bb-0310-9956-ffa450edef68
2018-06-15 14:35:31 +00:00
6d730fb7ed mod_ssl: use SSL_HAVE_PROTOCOL_TLSV1_3 to check for compiled in TLS 1.3.
More meaningful than SSL_OP_NO_TLSv1_3, hopefully...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1833589 13f79535-47bb-0310-9956-ffa450edef68
2018-06-15 11:25:46 +00:00
acd5236f90 * modules/ssl/ssl_engine_init.c (ssl_init_server_certs): Add error
logno. Free EVP_PKEY in engine case.  Never try reading ECDH/DH
  parameters from engine ids.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1831173 13f79535-47bb-0310-9956-ffa450edef68
2018-05-08 12:50:26 +00:00
bba7b9805a mod_ssl: Add support for loading TLS certificates through the PKCS#11
engine.

* modules/ssl/ssl_util.c (modssl_is_engine_id): Renamed
  from modssl_is_engine_key.
  
* modules/ssl/ssl_engine_config.c (ssl_cmd_SSLCertificateKeyFile):
  Adjust accordingly.
  (ssl_cmd_SSLCertificateFile): Also allow ENGINE cert ids.

* modules/ssl/ssl_engine_pphrase.c (modssl_load_engine_keypair):
  Rename from modssl_load_engine_key; load certificate if
  cert id is passed.

* modules/ssl/ssl_engine_init.c (ssl_init_server_certs): Optionally
  load the certificate from the engine as well.

* docs/manual/: Update manual.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1831168 13f79535-47bb-0310-9956-ffa450edef68
2018-05-08 12:39:22 +00:00
04294308f6 mod_ssl: Add support for loading private keys from ENGINEs. Support
for PKCS#11 URIs only, and PIN entry is not threaded through
SSLPassPhraseDialog config yet.

* modules/ssl/ssl_util.c (modssl_is_engine_key): New function.

* modules/ssl/ssl_engine_config.c (ssl_cmd_SSLCertificateKeyFile):
  Use it, skip check for file existence for engine keys.

* modules/ssl/ssl_engine_pphrase.c (modssl_load_engine_pkey):
  New function.

* modules/ssl/ssl_engine_init.c (ssl_init_server_certs):
  For engine keys, load via modssl_load_engine_pkey.

Submitted by: Anderson Sasaki <ansasaki redhat.com>, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1830819 13f79535-47bb-0310-9956-ffa450edef68
2018-05-03 13:06:46 +00:00
7603230ed1 * modules/ssl: Add some missing logno tags.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1830816 13f79535-47bb-0310-9956-ffa450edef68
2018-05-03 12:25:32 +00:00
c81b2af0c8 Follow up to r1828222: fix "defined but not used 'prot'" warning with libressl.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1830522 13f79535-47bb-0310-9956-ffa450edef68
2018-04-29 22:07:26 +00:00
81af07c707 * modules/ssl/ssl_engine_init.c (ssl_init_Module): Don't enable SSL
for a vhost if SSLEnable is not used and no certs are configured,
  even if the Listen protocol is "https".  Restores behaviour to that
  prior to r1809303 for configs which would now otherwise fail at
  startup.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1829513 13f79535-47bb-0310-9956-ffa450edef68
2018-04-19 08:02:41 +00:00
5968cd3a3e COMPAT BREAK: This may change the hash keys used to cache privkeys
across a reload so don't backport this to 2.4.  Otherwise it's only
user-visible in logging output.

* modules/ssl/ssl_engine_init.c (ssl_init_Module): Derive the vhost_id
  *after* potentially setting sc->enabled to default-on, since the
  port used may change if not specified explicitly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1828913 13f79535-47bb-0310-9956-ffa450edef68
2018-04-11 16:11:21 +00:00
c9e9ecff20 On the trunk:
mod_ssl: proper checks for libressl 2.07/8 and its TLSv1_3 support, see PR 62236.
     [Bernard Spil <brnrd@freebsd.org>]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1828222 13f79535-47bb-0310-9956-ffa450edef68
2018-04-03 12:19:28 +00:00
afba88ef3d On the trunk:
mod_ssl: guard use of TLS1_3_VERSION with proper #ifdefs



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1828220 13f79535-47bb-0310-9956-ffa450edef68
2018-04-03 11:49:17 +00:00
352d92c698 On the trunk:
mod_ssl TLSv1.3 support, removed V1_3 cipher suite directives again and added an optional protocol specifier to the SSLCipherSuite and SSLProxyCipherSuite commands.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1827992 13f79535-47bb-0310-9956-ffa450edef68
2018-03-29 14:10:12 +00:00
8b305c8397 On the trunk:
mod_ssl: Added configuration directives for TLSv1.3 cipher suites (which
     are separate from previous ones) as SSL(Proxy)CipherSuiteV1_3. A great opportunity
     to find a better name.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1827924 13f79535-47bb-0310-9956-ffa450edef68
2018-03-28 15:38:51 +00:00
2ab41d39d8 On the trunk:
mod_ssl: add support for TLSv1.3 (tested with OpenSSL v1.1.1-pre3, other libs may
     need more sugar). 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1827912 13f79535-47bb-0310-9956-ffa450edef68
2018-03-28 11:15:18 +00:00
1c9a4b1a2a On the trunk:
mod_ssl: reverting r1807709 (SSLEngine with addr:port spec) as a "seemed a good idea at the time" thing.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1827760 13f79535-47bb-0310-9956-ffa450edef68
2018-03-26 13:09:27 +00:00
f8df6dc61a On the trunk:
mod_ssl: heavily simplified SSLPolicy. No more user defines, no propxy policies,
     just the basic "modern", "intermediate" and "old" as specified by Mozilla security.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1827561 13f79535-47bb-0310-9956-ffa450edef68
2018-03-23 12:24:29 +00:00
1184290ddd Extend SSLOCSPEnable with mode 'leaf' that only checks the leaf of a certificate chain. PR62112 [Ricardo Martin Camarero <rickyepoderi@yahoo.es>]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1826995 13f79535-47bb-0310-9956-ffa450edef68
2018-03-16 15:25:08 +00:00
1219487383 Follow-up to r1825120:
* modules/ssl/ssl_engine_init.c (ssl_init_ca_cert_path): Since
  SSL_add_file_cert_subjects_to_stack() internally replaces the
  comparison callback with one equivalent to
  ssl_init_FindCAList_X509NameCmp, there's no point in using that
  here.
  (ssl_init_FindCAList_X509NameCmp): Removed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1825124 13f79535-47bb-0310-9956-ffa450edef68
2018-02-23 12:10:49 +00:00
348083128d * modules/ssl/ssl_engine_init.c (ssl_init_PushCAList): Remove function.
(ssl_init_ca_cert_path): Use SSL_add_file_cert_subjects_to_stack()
  instead.

[Edit: This does change behaviour: the acceptable client CA list is now 
 always be sent in sorted order rather than configured/file order.
 In the case of SSLCACertificatePath and SSLCADNRequestPath, the
 order will be stable rather than non-determistic as previously.]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1825120 13f79535-47bb-0310-9956-ffa450edef68
2018-02-23 11:51:49 +00:00
c88a8745d6 On the trunk:
updated missing log tags.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1818030 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 15:02:54 +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
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
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
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
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
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
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
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
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
f82a8bdc2b mod_ssl: follow up to r1781187.
The ssl_util_thread_*() functions are not necessary with openssl-1.1+



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1781190 13f79535-47bb-0310-9956-ffa450edef68
2017-02-01 00:32:59 +00:00
ad6088c88d mod_ssl: follow up to r1740928: fix memory leaks.
[Reverted by r1781311]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1781188 13f79535-47bb-0310-9956-ffa450edef68
2017-01-31 23:39:58 +00:00
d79b514c4b Fix spelling in comments and text files.
No functional change.
PR 59990


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756038 13f79535-47bb-0310-9956-ffa450edef68
2016-08-11 19:50:02 +00:00
039212b23e mod_ssl: follow up to r1734561.
Don't enable CRL checks/flags by default.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1748368 13f79535-47bb-0310-9956-ffa450edef68
2016-06-14 09:35:13 +00:00
f9ad2754f7 mod_proxy, mod_ssl: Handle SSLProxy* directives in <Proxy> sections,
allowing per backend TLS configuration.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1740928 13f79535-47bb-0310-9956-ffa450edef68
2016-04-26 00:04:57 +00:00
6ba30d2c2b Support for OpenSSL 1.1.0:
- symbols get_rfc..._prime_... have been
  renamed to BN_get_rfc..._prime_...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1740652 13f79535-47bb-0310-9956-ffa450edef68
2016-04-23 12:36:43 +00:00
57230dc7f0 fix compiler warning about missing prototype
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1738461 13f79535-47bb-0310-9956-ffa450edef68
2016-04-10 20:26:12 +00:00
89db09bb58 Support for OpenSSL 1.1.0:
- DH was made opaque


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1738410 13f79535-47bb-0310-9956-ffa450edef68
2016-04-10 09:02:15 +00:00
f31ec0318d Support for OpenSSL 1.1.0:
- BIO was made opaque after OpenSSL 1.1.0pre4.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1737657 13f79535-47bb-0310-9956-ffa450edef68
2016-04-04 11:33:31 +00:00