File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,8 +90,15 @@ ngx_http_lua_ffi_socket_tcp_get_ssl_ctx(ngx_http_request_t *r,
9090ngx_lua_ffi_socket_tcp_getoption = C .ngx_http_lua_ffi_socket_tcp_getoption
9191ngx_lua_ffi_socket_tcp_setoption = C .ngx_http_lua_ffi_socket_tcp_setoption
9292ngx_lua_ffi_socket_getfd = C .ngx_http_lua_ffi_socket_tcp_getfd
93+ if pcall (function () return C .ngx_http_lua_ffi_socket_tcp_get_ssl_pointer end )
94+ then
9395ngx_lua_ffi_socket_getsslpointer = C .ngx_http_lua_ffi_socket_tcp_get_ssl_pointer
96+ end
97+
98+ if pcall (function () return C .ngx_http_lua_ffi_socket_tcp_get_ssl_ctx end ) then
9499ngx_lua_ffi_socket_getsslctx = C .ngx_http_lua_ffi_socket_tcp_get_ssl_ctx
100+ end
101+
95102
96103elseif subsystem == ' stream' then
97104
@@ -122,9 +129,15 @@ ngx_stream_lua_ffi_socket_tcp_get_ssl_ctx(ngx_stream_lua_request_t *r,
122129ngx_lua_ffi_socket_tcp_getoption = C .ngx_stream_lua_ffi_socket_tcp_getoption
123130ngx_lua_ffi_socket_tcp_setoption = C .ngx_stream_lua_ffi_socket_tcp_setoption
124131ngx_lua_ffi_socket_getfd = C .ngx_stream_lua_ffi_socket_tcp_getfd
132+ if pcall (function () return C .ngx_stream_lua_ffi_socket_tcp_get_ssl_pointer end )
133+ then
125134ngx_lua_ffi_socket_getsslpointer =
126135 C .ngx_stream_lua_ffi_socket_tcp_get_ssl_pointer
127- ngx_lua_ffi_socket_getsslctx = C .ngx_stream_lua_ffi_socket_tcp_get_ssl_ctx
136+ end
137+ if pcall (function () return C .ngx_stream_lua_ffi_socket_tcp_get_ssl_pointer end )
138+ then
139+ ngx_lua_ffi_socket_getsslctx = C .ngx_stream_lua_ffi_socket_tcp_get_ssl_pointer
140+ end
128141end
129142
130143
You can’t perform that action at this time.
0 commit comments