Skip to content

Commit 1065213

Browse files
committed
observations about ngx_lua_ffi_ssl_get_client_hello_ext_present [0]
1 parent 8193d5e commit 1065213

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/ngx/ssl/clienthello.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ if subsystem == 'http' then
4141

4242
int ngx_http_lua_ffi_ssl_set_protocols(ngx_http_request_t *r,
4343
int protocols, char **err);
44+
4445
int ngx_http_lua_ffi_ssl_get_client_hello_ext_present(ngx_http_request_t *r,
4546
int **extensions, size_t *extensions_len, char **err);
47+
/* Undefined for the stream subsystem */
4648
]]
4749

4850
ngx_lua_ffi_ssl_get_client_hello_server_name =
@@ -125,6 +127,8 @@ function _M.get_client_hello_ext_present()
125127

126128
local rc = ngx_lua_ffi_ssl_get_client_hello_ext_present(r, intp,
127129
sizep, errmsg)
130+
-- the function used under the hood, SSL_client_hello_get1_extensions_present,
131+
-- already excludes GREASE, thank G*d
128132
if rc == FFI_OK then -- Convert C array to Lua table
129133
local array = intp[0]
130134
local size = tonumber(sizep[0])

0 commit comments

Comments
 (0)