Skip to content

Commit

Permalink
Check for SSL context instead of listen.
Browse files Browse the repository at this point in the history
This fixes FTBFS with nginx 1.25.5 after changes in https://hg.nginx.org/nginx/rev/e28b044908cb
  • Loading branch information
thresheek committed Mar 22, 2024
1 parent cb82db3 commit 2647494
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ngx_stream_lua_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,12 +864,20 @@ ngx_stream_lua_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_stream_lua_srv_conf_t *conf = child;

#if (NGX_STREAM_SSL)
#if defined(nginx_version) && nginx_version >= 1025005
ngx_stream_ssl_srv_conf_t *sscf;
#else
ngx_stream_ssl_conf_t *sscf;
#endif

dd("merge srv conf");

sscf = ngx_stream_conf_get_module_srv_conf(cf, ngx_stream_ssl_module);
#if defined(nginx_version) && nginx_version >= 1025005
if (sscf && sscf->ssl.ctx) {
#else
if (sscf && sscf->listen) {
#endif
if (conf->srv.ssl_client_hello_src.len == 0) {
conf->srv.ssl_client_hello_src = prev->srv.ssl_client_hello_src;
conf->srv.ssl_client_hello_src_key =
Expand Down
4 changes: 4 additions & 0 deletions src/ngx_stream_lua_ssl_certby.c
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,11 @@ ngx_stream_lua_ffi_ssl_verify_client(ngx_stream_lua_request_t *r,

ngx_stream_lua_ctx_t *ctx;
ngx_ssl_conn_t *ssl_conn;
#if defined(nginx_version) && nginx_version >= 1025005
ngx_stream_ssl_srv_conf_t *sscf;
#else
ngx_stream_ssl_conf_t *sscf;
#endif
STACK_OF(X509) *chain = ca_certs;
STACK_OF(X509_NAME) *name_chain = NULL;
X509 *x509 = NULL;
Expand Down

0 comments on commit 2647494

Please sign in to comment.