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