]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merged /httpd/httpd/trunk:r1864428 from trunk
authorStefan Eissing <icing@apache.org>
Tue, 6 Aug 2019 12:16:14 +0000 (12:16 +0000)
committerStefan Eissing <icing@apache.org>
Tue, 6 Aug 2019 12:16:14 +0000 (12:16 +0000)
  *) mod_ssl: reverting a 2.4.40 change where a superfluous SSLCertificateChainFile configuration

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1864513 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/ssl/ssl_engine_init.c

diff --git a/CHANGES b/CHANGES
index 6afb2eff52c88427d3b324164eb32096a50abcc5..ff34b511a99b374ad55053a6d6da45f11da9c1c1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,9 @@ Changes with Apache 2.4.41
   *) modules/filters: PR 63633: Fix broken compilation when using old GCC (<4.2.x).
      [Rainer Jung, Joe Orton]
 
+  *) mod_ssl: reverting a 2.4.40 change where a superfluous SSLCertificateChainFile configuration
+     for a domain managed by mod_md could cause a startup error. [Stefan Eissing]
+
 Changes with Apache 2.4.40
 
   *) core, mod_rewrite: Set PCRE_DOTALL by default. Revert via 
index 1644739e8c26fadadcc94f177796eb76cca93185..f54c922fc79e78a5c3b2e1037978cd9f20c9a1f8 100644 (file)
@@ -1770,19 +1770,21 @@ static apr_status_t ssl_init_server_ctx(server_rec *s,
     n = pks->cert_files->nelts;
     ssl_run_add_cert_files(s, p, pks->cert_files, pks->key_files);
 
-    if (n < pks->cert_files->nelts) {
-        /* this overrides any old chain configuration */
-        sc->server->cert_chain = NULL;
+    if (apr_is_empty_array(pks->cert_files)) {
+        /* does someone propose a certiciate to fall back on here? */
+        ssl_run_add_fallback_cert_files(s, p, pks->cert_files, pks->key_files);
+        if (n < pks->cert_files->nelts) {
+            pks->service_unavailable = 1;
+            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(10085)
+                         "Init: %s will respond with '503 Service Unavailable' for now. There "
+                         "are no SSL certificates configured and no other module contributed any.",
+                         ssl_util_vhostid(p, s));
+        }
     }
     
-    if (apr_is_empty_array(pks->cert_files) && !sc->server->cert_chain) {
-        ssl_run_add_fallback_cert_files(s, p, pks->cert_files, pks->key_files);
-        
-        pks->service_unavailable = 1;
-        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(10085)
-                     "Init: %s will respond with '503 Service Unavailable' for now. There "
-                     "are no SSL certificates configured and no other module contributed any.",
-                     ssl_util_vhostid(p, s));
+    if (n < pks->cert_files->nelts) {
+        /* additionally installed certs overrides any old chain configuration */
+        sc->server->cert_chain = NULL;
     }
     
     if ((rv = ssl_init_ctx(s, p, ptemp, sc->server)) != APR_SUCCESS) {