Skip to content

Commit eef438a

Browse files
feature: add ngx_stream_lua_ffi_get_req_ssl_pointer() for stream subsystem.
1 parent 8a34bf5 commit eef438a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/ngx_stream_lua_ssl_certby.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,6 +1705,24 @@ ngx_stream_lua_ffi_ssl_verify_client(ngx_stream_lua_request_t *r,
17051705
}
17061706

17071707

1708+
ngx_ssl_conn_t *
1709+
ngx_stream_lua_ffi_get_req_ssl_pointer(ngx_stream_lua_request_t *r,
1710+
const char **err)
1711+
{
1712+
if (r->connection == NULL || r->connection->ssl == NULL) {
1713+
*err = "bad request";
1714+
return NULL;
1715+
}
1716+
1717+
if (r->connection->ssl->connection == NULL) {
1718+
*err = "bad ssl connection";
1719+
return NULL;
1720+
}
1721+
1722+
return r->connection->ssl->connection;
1723+
}
1724+
1725+
17081726
int
17091727
ngx_stream_lua_ffi_ssl_client_random(ngx_stream_lua_request_t *r,
17101728
unsigned char *out, size_t *outlen, char **err)

0 commit comments

Comments
 (0)