Skip to content

Commit 05f1cba

Browse files
bugfix: fixed warning.
1 parent 83dce02 commit 05f1cba

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

‎src/ngx_stream_lua_proxy_ssl_verifyby.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ ngx_stream_lua_proxy_ssl_verify_set_callback(ngx_conf_t *cf)
5252

5353
ngx_flag_t proxy_ssl = 0;
5454
ngx_pool_cleanup_t *cln;
55-
ngx_ssl_t *ssl;
55+
ngx_ssl_t *ssl = NULL;
5656
void *pscf;
5757

5858
/*
@@ -94,6 +94,12 @@ ngx_stream_lua_proxy_ssl_verify_set_callback(ngx_conf_t *cf)
9494

9595
#else
9696

97+
if (ssl == NULL) {
98+
ngx_log_error(NGX_LOG_EMERG, cf->log, 0, "proxy_ssl_verify_by_lua* "
99+
"should be used with proxy_ssl directive");
100+
return NGX_ERROR;
101+
}
102+
97103
SSL_CTX_set_cert_verify_callback(ssl->ctx,
98104
ngx_stream_lua_proxy_ssl_verify_handler,
99105
NULL);

‎src/ngx_stream_lua_socket_udp.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1831,7 +1831,9 @@ ngx_stream_lua_socket_udp_setoption(lua_State *L)
18311831
{
18321832
ngx_stream_lua_ctx_t *ctx;
18331833
int n;
1834+
#if (NGX_HAVE_TRANSPARENT_PROXY)
18341835
int ip_transparent;
1836+
#endif
18351837
size_t len;
18361838
u_char *option;
18371839

0 commit comments

Comments
 (0)