Klaus Demo nginx / 9a37eb3
SSL: added support for TLSv1.3 in ssl_protocols directive. Support for the TLSv1.3 protocol will be introduced in OpenSSL 1.1.1. Sergey Kandaurov 5 years ago
8 changed file(s) with 13 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
320320 SSL_CTX_clear_options(ssl->ctx, SSL_OP_NO_TLSv1_2);
321321 if (!(protocols & NGX_SSL_TLSv1_2)) {
322322 SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_TLSv1_2);
323 }
324 #endif
325 #ifdef SSL_OP_NO_TLSv1_3
326 SSL_CTX_clear_options(ssl->ctx, SSL_OP_NO_TLSv1_3);
327 if (!(protocols & NGX_SSL_TLSv1_3)) {
328 SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_TLSv1_3);
323329 }
324330 #endif
325331
130130 #define NGX_SSL_TLSv1 0x0008
131131 #define NGX_SSL_TLSv1_1 0x0010
132132 #define NGX_SSL_TLSv1_2 0x0020
133 #define NGX_SSL_TLSv1_3 0x0040
133134
134135
135136 #define NGX_SSL_BUFFER 1
234234 { ngx_string("TLSv1"), NGX_SSL_TLSv1 },
235235 { ngx_string("TLSv1.1"), NGX_SSL_TLSv1_1 },
236236 { ngx_string("TLSv1.2"), NGX_SSL_TLSv1_2 },
237 { ngx_string("TLSv1.3"), NGX_SSL_TLSv1_3 },
237238 { ngx_null_string, 0 }
238239 };
239240
5656 { ngx_string("TLSv1"), NGX_SSL_TLSv1 },
5757 { ngx_string("TLSv1.1"), NGX_SSL_TLSv1_1 },
5858 { ngx_string("TLSv1.2"), NGX_SSL_TLSv1_2 },
59 { ngx_string("TLSv1.3"), NGX_SSL_TLSv1_3 },
5960 { ngx_null_string, 0 }
6061 };
6162
128128 { ngx_string("TLSv1"), NGX_SSL_TLSv1 },
129129 { ngx_string("TLSv1.1"), NGX_SSL_TLSv1_1 },
130130 { ngx_string("TLSv1.2"), NGX_SSL_TLSv1_2 },
131 { ngx_string("TLSv1.3"), NGX_SSL_TLSv1_3 },
131132 { ngx_null_string, 0 }
132133 };
133134
4141 { ngx_string("TLSv1"), NGX_SSL_TLSv1 },
4242 { ngx_string("TLSv1.1"), NGX_SSL_TLSv1_1 },
4343 { ngx_string("TLSv1.2"), NGX_SSL_TLSv1_2 },
44 { ngx_string("TLSv1.3"), NGX_SSL_TLSv1_3 },
4445 { ngx_null_string, 0 }
4546 };
4647
102102 { ngx_string("TLSv1"), NGX_SSL_TLSv1 },
103103 { ngx_string("TLSv1.1"), NGX_SSL_TLSv1_1 },
104104 { ngx_string("TLSv1.2"), NGX_SSL_TLSv1_2 },
105 { ngx_string("TLSv1.3"), NGX_SSL_TLSv1_3 },
105106 { ngx_null_string, 0 }
106107 };
107108
4444 { ngx_string("TLSv1"), NGX_SSL_TLSv1 },
4545 { ngx_string("TLSv1.1"), NGX_SSL_TLSv1_1 },
4646 { ngx_string("TLSv1.2"), NGX_SSL_TLSv1_2 },
47 { ngx_string("TLSv1.3"), NGX_SSL_TLSv1_3 },
4748 { ngx_null_string, 0 }
4849 };
4950