summaryrefslogtreecommitdiffhomepage
path: root/src/stream
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream')
-rw-r--r--src/stream/ngx_stream_proxy_module.c8
-rw-r--r--src/stream/ngx_stream_ssl_module.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/src/stream/ngx_stream_proxy_module.c b/src/stream/ngx_stream_proxy_module.c
index 0890a04ae..2b6f9baaf 100644
--- a/src/stream/ngx_stream_proxy_module.c
+++ b/src/stream/ngx_stream_proxy_module.c
@@ -2181,12 +2181,16 @@ ngx_stream_proxy_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_conf_merge_value(conf->ssl_session_reuse,
prev->ssl_session_reuse, 1);
+#ifndef SSL_OP_NO_TLSv1_2
ngx_conf_merge_bitmask_value(conf->ssl_protocols, prev->ssl_protocols,
(NGX_CONF_BITMASK_SET
-#ifndef SSL_OP_NO_TLSv1_2
|NGX_SSL_TLSv1|NGX_SSL_TLSv1_1
-#endif
|NGX_SSL_TLSv1_2|NGX_SSL_TLSv1_3));
+#else
+ ngx_conf_merge_bitmask_value(conf->ssl_protocols, prev->ssl_protocols,
+ (NGX_CONF_BITMASK_SET
+ |NGX_SSL_TLSv1_2|NGX_SSL_TLSv1_3));
+#endif
ngx_conf_merge_str_value(conf->ssl_ciphers, prev->ssl_ciphers, "DEFAULT");
diff --git a/src/stream/ngx_stream_ssl_module.c b/src/stream/ngx_stream_ssl_module.c
index 55bc54a44..8177d580f 100644
--- a/src/stream/ngx_stream_ssl_module.c
+++ b/src/stream/ngx_stream_ssl_module.c
@@ -882,12 +882,16 @@ ngx_stream_ssl_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_conf_merge_value(conf->reject_handshake, prev->reject_handshake, 0);
+#ifndef SSL_OP_NO_TLSv1_2
ngx_conf_merge_bitmask_value(conf->protocols, prev->protocols,
(NGX_CONF_BITMASK_SET
-#ifndef SSL_OP_NO_TLSv1_2
|NGX_SSL_TLSv1|NGX_SSL_TLSv1_1
-#endif
|NGX_SSL_TLSv1_2|NGX_SSL_TLSv1_3));
+#else
+ ngx_conf_merge_bitmask_value(conf->protocols, prev->protocols,
+ (NGX_CONF_BITMASK_SET
+ |NGX_SSL_TLSv1_2|NGX_SSL_TLSv1_3));
+#endif
ngx_conf_merge_uint_value(conf->verify, prev->verify, 0);
ngx_conf_merge_uint_value(conf->verify_depth, prev->verify_depth, 1);