affd30d
diff --git a/modules/ssl/ssl_engine_config.c b/modules/ssl/ssl_engine_config.c
affd30d
index 55c237e..5467d23 100644
affd30d
--- a/modules/ssl/ssl_engine_config.c
affd30d
+++ b/modules/ssl/ssl_engine_config.c
affd30d
@@ -119,7 +119,7 @@ static void modssl_ctx_init(modssl_ctx_t *mctx, apr_pool_t *p)
8643397
     mctx->ticket_key          = NULL;
8643397
 #endif
8643397
 
8643397
-    mctx->protocol            = SSL_PROTOCOL_DEFAULT;
8643397
+    mctx->protocol            = SSL_PROTOCOL_NONE;
8643397
     mctx->protocol_set        = 0;
8643397
 
8643397
     mctx->pphrase_dialog_type = SSL_PPTYPE_UNSET;
affd30d
@@ -262,6 +262,7 @@ static void modssl_ctx_cfg_merge(apr_pool_t *p,
affd30d
 {
affd30d
     if (add->protocol_set) {
affd30d
         mrg->protocol = add->protocol;
affd30d
+        mrg->protocol_set = 1;
affd30d
     }
affd30d
     else {
affd30d
         mrg->protocol = base->protocol;
affd30d
diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
affd30d
index e3f62fe..31fc0e6 100644
affd30d
--- a/modules/ssl/ssl_engine_init.c
affd30d
+++ b/modules/ssl/ssl_engine_init.c
affd30d
@@ -568,6 +568,7 @@ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
affd30d
     MODSSL_SSL_METHOD_CONST SSL_METHOD *method = NULL;
affd30d
     char *cp;
affd30d
     int protocol = mctx->protocol;
affd30d
+    int protocol_set = mctx->protocol_set;
affd30d
     SSLSrvConfigRec *sc = mySrvConfig(s);
affd30d
 #if OPENSSL_VERSION_NUMBER >= 0x10100000L
affd30d
     int prot;
affd30d
@@ -577,12 +578,18 @@ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
8643397
      *  Create the new per-server SSL context
8643397
      */
8643397
     if (protocol == SSL_PROTOCOL_NONE) {
8643397
-        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02231)
8643397
-                "No SSL protocols available [hint: SSLProtocol]");
8643397
-        return ssl_die(s);
affd30d
-    }
affd30d
+        if (protocol_set) {
affd30d
+            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02231)
affd30d
+                    "No SSL protocols available [hint: SSLProtocol]");
affd30d
+            return ssl_die(s);
affd30d
+        }
affd30d
 
affd30d
-    cp = apr_pstrcat(p,
8643397
+        ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, s, 
8643397
+                     "Using OpenSSL/system default SSL/TLS protocols");
affd30d
+        cp = "default";
affd30d
+    }
affd30d
+    else {
affd30d
+        cp = apr_pstrcat(p,
affd30d
 #ifndef OPENSSL_NO_SSL3
affd30d
                      (protocol & SSL_PROTOCOL_SSLV3 ? "SSLv3, " : ""),
affd30d
 #endif
affd30d
@@ -595,7 +602,8 @@ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
affd30d
 #endif
affd30d
 #endif
affd30d
                      NULL);
affd30d
-    cp[strlen(cp)-2] = NUL;
affd30d
+        cp[strlen(cp)-2] = NUL;
affd30d
+    }
8643397
 
affd30d
     ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, s,
affd30d
                  "Creating new SSL context (protocols: %s)", cp);
affd30d
@@ -696,13 +704,15 @@ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
8643397
         prot = SSL3_VERSION;
8643397
 #endif
affd30d
     } else {
8643397
-        SSL_CTX_free(ctx);
8643397
-        mctx->ssl_ctx = NULL;
8643397
-        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(03378)
8643397
-                "No SSL protocols available [hint: SSLProtocol]");
8643397
-        return ssl_die(s);
affd30d
+        if (protocol_set) {
affd30d
+            SSL_CTX_free(ctx);
affd30d
+            mctx->ssl_ctx = NULL;
affd30d
+            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(03378)
affd30d
+                    "No SSL protocols available [hint: SSLProtocol]");
affd30d
+            return ssl_die(s);
affd30d
+        }
8643397
     }
8643397
-    SSL_CTX_set_max_proto_version(ctx, prot);
8643397
+    if (protocol != SSL_PROTOCOL_NONE) SSL_CTX_set_max_proto_version(ctx, prot);
8643397
 
8643397
     /* Next we scan for the minimal protocol version we should provide,
8643397
      * but we do not allow holes between max and min */
affd30d
@@ -726,7 +736,7 @@ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
8643397
         prot = SSL3_VERSION;
8643397
     }
8643397
 #endif
8643397
-    SSL_CTX_set_min_proto_version(ctx, prot);
8643397
+    if (protocol != SSL_PROTOCOL_NONE) SSL_CTX_set_min_proto_version(ctx, prot);
8643397
 #endif /* if OPENSSL_VERSION_NUMBER < 0x10100000L */
8643397
 
8643397
 #ifdef SSL_OP_CIPHER_SERVER_PREFERENCE