mirror of
https://github.com/nginx/nginx.git
synced 2025-06-12 21:52:41 +08:00
SSL: stop loading configs with invalid "ssl_ciphers" values.
While there, remove unnecessary check in ngx_mail_ssl_module. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
This commit is contained in:
parent
35e2bb0efb
commit
f52a2c7585
@ -561,6 +561,7 @@ ngx_http_ssl_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
|
|||||||
ngx_ssl_error(NGX_LOG_EMERG, cf->log, 0,
|
ngx_ssl_error(NGX_LOG_EMERG, cf->log, 0,
|
||||||
"SSL_CTX_set_cipher_list(\"%V\") failed",
|
"SSL_CTX_set_cipher_list(\"%V\") failed",
|
||||||
&conf->ciphers);
|
&conf->ciphers);
|
||||||
|
return NGX_CONF_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conf->verify) {
|
if (conf->verify) {
|
||||||
|
@ -287,15 +287,14 @@ ngx_mail_ssl_merge_conf(ngx_conf_t *cf, void *parent, void *child)
|
|||||||
return NGX_CONF_ERROR;
|
return NGX_CONF_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conf->ciphers.len) {
|
if (SSL_CTX_set_cipher_list(conf->ssl.ctx,
|
||||||
if (SSL_CTX_set_cipher_list(conf->ssl.ctx,
|
(const char *) conf->ciphers.data)
|
||||||
(const char *) conf->ciphers.data)
|
== 0)
|
||||||
== 0)
|
{
|
||||||
{
|
ngx_ssl_error(NGX_LOG_EMERG, cf->log, 0,
|
||||||
ngx_ssl_error(NGX_LOG_EMERG, cf->log, 0,
|
"SSL_CTX_set_cipher_list(\"%V\") failed",
|
||||||
"SSL_CTX_set_cipher_list(\"%V\") failed",
|
&conf->ciphers);
|
||||||
&conf->ciphers);
|
return NGX_CONF_ERROR;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conf->prefer_server_ciphers) {
|
if (conf->prefer_server_ciphers) {
|
||||||
|
Loading…
Reference in New Issue
Block a user