]> granicus.if.org Git - apache/commitdiff
Fix merge problem with SSLProtocol that made SSLProtocol ALL ignored
authorEric Covener <covener@apache.org>
Thu, 22 Jan 2015 15:19:39 +0000 (15:19 +0000)
committerEric Covener <covener@apache.org>
Thu, 22 Jan 2015 15:19:39 +0000 (15:19 +0000)
in virtualhost context.

Submitted By: Michael Kaufmann <apache-bugzilla michael-kaufmann.ch>
Commited By: covener

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1653906 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/ssl/ssl_engine_config.c
modules/ssl/ssl_engine_init.c
modules/ssl/ssl_private.h

diff --git a/CHANGES b/CHANGES
index 59eda117c2e2a393815311693106f1a35c468dfb..9f4d7363498972d91056cb9a78fc153127cdbcfa 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_ssl: 'SSLProtocol ALL' was being ignored in virtual host context. 
+     PR 57100.  [Michael Kaufmann <apache-bugzilla michael-kaufmann.ch>]
+
   *) mod_rewrite: Improve 'bad flag delimeters' startup error by showing
      how the input was tokenized.  PR 56528. [Edward Lu <Chaosed0 gmail.com>]
 
index eed4e084c3c26eb245aceacd00b31da258bcf270..738a00cf6e593c029ca6dc40a8540471f4463807 100644 (file)
@@ -110,7 +110,7 @@ static void modssl_ctx_init(modssl_ctx_t *mctx, apr_pool_t *p)
     mctx->ticket_key          = NULL;
 #endif
 
-    mctx->protocol            = SSL_PROTOCOL_ALL;
+    mctx->protocol            = SSL_PROTOCOL_UNSET;
 
     mctx->pphrase_dialog_type = SSL_PPTYPE_UNSET;
     mctx->pphrase_dialog_path = NULL;
@@ -254,7 +254,7 @@ static void modssl_ctx_cfg_merge(apr_pool_t *p,
                                  modssl_ctx_t *add,
                                  modssl_ctx_t *mrg)
 {
-    cfgMerge(protocol, SSL_PROTOCOL_ALL);
+    cfgMerge(protocol, SSL_PROTOCOL_UNSET);
 
     cfgMerge(pphrase_dialog_type, SSL_PPTYPE_UNSET);
     cfgMergeString(pphrase_dialog_path);
index b44e01f1c27043db21958871cd634a5da0d7b751..903a5477a19c10dc159a3cd26ede48d5c4a0c64a 100644 (file)
@@ -209,10 +209,19 @@ apr_status_t ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
         if (sc->enabled == SSL_ENABLED_UNSET) {
             sc->enabled = SSL_ENABLED_FALSE;
         }
+
         if (sc->proxy_enabled == UNSET) {
             sc->proxy_enabled = FALSE;
         }
 
+        if (sc->server && sc->server->protocol == SSL_PROTOCOL_UNSET) {
+            sc->server->protocol = SSL_PROTOCOL_ALL;
+        }
+
+        if (sc->proxy && sc->proxy->protocol == SSL_PROTOCOL_UNSET) {
+            sc->proxy->protocol = SSL_PROTOCOL_ALL;
+        }
+
         if (sc->session_cache_timeout == UNSET) {
             sc->session_cache_timeout = SSL_SESSION_CACHE_TIMEOUT;
         }
index 140b9c30991b5161e47d42108b061940842ca642..69c4704fda78ed65234990cb374d6c5a2e89405c 100644 (file)
@@ -286,13 +286,14 @@ typedef int ssl_opt_t;
 /**
  * Define the SSL Protocol options
  */
-#define SSL_PROTOCOL_NONE  (0)
-#define SSL_PROTOCOL_SSLV2 (1<<0)
-#define SSL_PROTOCOL_SSLV3 (1<<1)
-#define SSL_PROTOCOL_TLSV1 (1<<2)
+#define SSL_PROTOCOL_UNSET (0)
+#define SSL_PROTOCOL_NONE  (1<<0)
+#define SSL_PROTOCOL_SSLV2 (1<<1)
+#define SSL_PROTOCOL_SSLV3 (1<<2)
+#define SSL_PROTOCOL_TLSV1 (1<<3)
 #ifdef HAVE_TLSV1_X
-#define SSL_PROTOCOL_TLSV1_1 (1<<3)
-#define SSL_PROTOCOL_TLSV1_2 (1<<4)
+#define SSL_PROTOCOL_TLSV1_1 (1<<4)
+#define SSL_PROTOCOL_TLSV1_2 (1<<5)
 #define SSL_PROTOCOL_ALL   (SSL_PROTOCOL_SSLV3|SSL_PROTOCOL_TLSV1| \
                             SSL_PROTOCOL_TLSV1_1|SSL_PROTOCOL_TLSV1_2)
 #else