mirror of
https://github.com/nginx/nginx.git
synced 2025-06-06 00:42:40 +08:00
SSL: added support for TLSv1.3 in ssl_protocols directive.
Support for the TLSv1.3 protocol will be introduced in OpenSSL 1.1.1.
This commit is contained in:
parent
05841adfb2
commit
9a37eb3a62
@ -323,6 +323,12 @@ ngx_ssl_create(ngx_ssl_t *ssl, ngx_uint_t protocols, void *data)
|
||||
SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_TLSv1_2);
|
||||
}
|
||||
#endif
|
||||
#ifdef SSL_OP_NO_TLSv1_3
|
||||
SSL_CTX_clear_options(ssl->ctx, SSL_OP_NO_TLSv1_3);
|
||||
if (!(protocols & NGX_SSL_TLSv1_3)) {
|
||||
SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_TLSv1_3);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SSL_OP_NO_COMPRESSION
|
||||
SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_COMPRESSION);
|
||||
|
@ -131,6 +131,7 @@ typedef struct {
|
||||
#define NGX_SSL_TLSv1 0x0008
|
||||
#define NGX_SSL_TLSv1_1 0x0010
|
||||
#define NGX_SSL_TLSv1_2 0x0020
|
||||
#define NGX_SSL_TLSv1_3 0x0040
|
||||
|
||||
|
||||
#define NGX_SSL_BUFFER 1
|
||||
|
@ -235,6 +235,7 @@ static ngx_conf_bitmask_t ngx_http_proxy_ssl_protocols[] = {
|
||||
{ ngx_string("TLSv1"), NGX_SSL_TLSv1 },
|
||||
{ ngx_string("TLSv1.1"), NGX_SSL_TLSv1_1 },
|
||||
{ ngx_string("TLSv1.2"), NGX_SSL_TLSv1_2 },
|
||||
{ ngx_string("TLSv1.3"), NGX_SSL_TLSv1_3 },
|
||||
{ ngx_null_string, 0 }
|
||||
};
|
||||
|
||||
|
@ -57,6 +57,7 @@ static ngx_conf_bitmask_t ngx_http_ssl_protocols[] = {
|
||||
{ ngx_string("TLSv1"), NGX_SSL_TLSv1 },
|
||||
{ ngx_string("TLSv1.1"), NGX_SSL_TLSv1_1 },
|
||||
{ ngx_string("TLSv1.2"), NGX_SSL_TLSv1_2 },
|
||||
{ ngx_string("TLSv1.3"), NGX_SSL_TLSv1_3 },
|
||||
{ ngx_null_string, 0 }
|
||||
};
|
||||
|
||||
|
@ -129,6 +129,7 @@ static ngx_conf_bitmask_t ngx_http_uwsgi_ssl_protocols[] = {
|
||||
{ ngx_string("TLSv1"), NGX_SSL_TLSv1 },
|
||||
{ ngx_string("TLSv1.1"), NGX_SSL_TLSv1_1 },
|
||||
{ ngx_string("TLSv1.2"), NGX_SSL_TLSv1_2 },
|
||||
{ ngx_string("TLSv1.3"), NGX_SSL_TLSv1_3 },
|
||||
{ ngx_null_string, 0 }
|
||||
};
|
||||
|
||||
|
@ -42,6 +42,7 @@ static ngx_conf_bitmask_t ngx_mail_ssl_protocols[] = {
|
||||
{ ngx_string("TLSv1"), NGX_SSL_TLSv1 },
|
||||
{ ngx_string("TLSv1.1"), NGX_SSL_TLSv1_1 },
|
||||
{ ngx_string("TLSv1.2"), NGX_SSL_TLSv1_2 },
|
||||
{ ngx_string("TLSv1.3"), NGX_SSL_TLSv1_3 },
|
||||
{ ngx_null_string, 0 }
|
||||
};
|
||||
|
||||
|
@ -103,6 +103,7 @@ static ngx_conf_bitmask_t ngx_stream_proxy_ssl_protocols[] = {
|
||||
{ ngx_string("TLSv1"), NGX_SSL_TLSv1 },
|
||||
{ ngx_string("TLSv1.1"), NGX_SSL_TLSv1_1 },
|
||||
{ ngx_string("TLSv1.2"), NGX_SSL_TLSv1_2 },
|
||||
{ ngx_string("TLSv1.3"), NGX_SSL_TLSv1_3 },
|
||||
{ ngx_null_string, 0 }
|
||||
};
|
||||
|
||||
|
@ -45,6 +45,7 @@ static ngx_conf_bitmask_t ngx_stream_ssl_protocols[] = {
|
||||
{ ngx_string("TLSv1"), NGX_SSL_TLSv1 },
|
||||
{ ngx_string("TLSv1.1"), NGX_SSL_TLSv1_1 },
|
||||
{ ngx_string("TLSv1.2"), NGX_SSL_TLSv1_2 },
|
||||
{ ngx_string("TLSv1.3"), NGX_SSL_TLSv1_3 },
|
||||
{ ngx_null_string, 0 }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user