Skip to content

Commit bea8a0c

Browse files
authored
bugfix: Check for SSL context instead of listen.
This fixes FTBFS with nginx 1.25.5 after changes in https://hg.nginx.org/nginx/rev/e28b044908cb and https://hg.nginx.org/nginx/rev/fa75fccf7fa0
1 parent cb82db3 commit bea8a0c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/ngx_stream_lua_module.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,12 +864,20 @@ ngx_stream_lua_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
864864
ngx_stream_lua_srv_conf_t *conf = child;
865865

866866
#if (NGX_STREAM_SSL)
867+
#if defined(nginx_version) && nginx_version >= 1025005
868+
ngx_stream_ssl_srv_conf_t *sscf;
869+
#else
867870
ngx_stream_ssl_conf_t *sscf;
871+
#endif
868872

869873
dd("merge srv conf");
870874

871875
sscf = ngx_stream_conf_get_module_srv_conf(cf, ngx_stream_ssl_module);
876+
#if defined(nginx_version) && nginx_version >= 1025005
877+
if (sscf && sscf->ssl.ctx) {
878+
#else
872879
if (sscf && sscf->listen) {
880+
#endif
873881
if (conf->srv.ssl_client_hello_src.len == 0) {
874882
conf->srv.ssl_client_hello_src = prev->srv.ssl_client_hello_src;
875883
conf->srv.ssl_client_hello_src_key =

src/ngx_stream_lua_ssl_certby.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,7 +1483,11 @@ ngx_stream_lua_ffi_ssl_verify_client(ngx_stream_lua_request_t *r,
14831483

14841484
ngx_stream_lua_ctx_t *ctx;
14851485
ngx_ssl_conn_t *ssl_conn;
1486+
#if defined(nginx_version) && nginx_version >= 1025005
1487+
ngx_stream_ssl_srv_conf_t *sscf;
1488+
#else
14861489
ngx_stream_ssl_conf_t *sscf;
1490+
#endif
14871491
STACK_OF(X509) *chain = ca_certs;
14881492
STACK_OF(X509_NAME) *name_chain = NULL;
14891493
X509 *x509 = NULL;

0 commit comments

Comments
 (0)