Skip to content

Commit 5777a36

Browse files
bugfix: failed to build on the old nginx version.
1 parent 0b5507a commit 5777a36

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/ngx_http_lua_module.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,11 @@ ngx_http_lua_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
15141514
ngx_conf_merge_bitmask_value(conf->ssl_protocols, prev->ssl_protocols,
15151515
(NGX_CONF_BITMASK_SET
15161516
|NGX_SSL_TLSv1|NGX_SSL_TLSv1_1
1517-
|NGX_SSL_TLSv1_2|NGX_SSL_TLSv1_3));
1517+
|NGX_SSL_TLSv1_2
1518+
#ifdef NGX_SSL_TLSv1_3
1519+
|NGX_SSL_TLSv1_3
1520+
#endif
1521+
));
15181522

15191523
ngx_conf_merge_str_value(conf->ssl_ciphers, prev->ssl_ciphers,
15201524
"DEFAULT");

src/ngx_http_lua_ssl_client_helloby.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ ngx_http_lua_ffi_ssl_set_protocols(ngx_http_request_t *r,
712712
}
713713
#endif
714714

715-
#ifdef SSL_OP_NO_TLSv1_3
715+
#if defined(NGX_SSL_TLSv1_3) && defined( SSL_OP_NO_TLSv1_3)
716716
SSL_clear_options(ssl_conn, SSL_OP_NO_TLSv1_3);
717717
if (!(protocols & NGX_SSL_TLSv1_3)) {
718718
SSL_set_options(ssl_conn, SSL_OP_NO_TLSv1_3);

0 commit comments

Comments
 (0)