Skip to content

Commit a975f7d

Browse files
committed
ciphers to unigned short *
1 parent c0533ba commit a975f7d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/ngx/ssl/clienthello.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ local lshift = bit.lshift
2222
local table_insert = table.insert
2323
local table_new = require "table.new"
2424
local intp = ffi.new("int*[1]")
25+
local usp = ffi.new("unsigned short*[1]")
2526

2627

2728
local ngx_lua_ffi_ssl_get_client_hello_server_name
@@ -169,10 +170,10 @@ function _M.get_client_hello_ciphers()
169170

170171
local sizep = get_size_ptr()
171172

172-
local rc = ngx_lua_ffi_ssl_get_client_hello_ciphers(r, intp,
173+
local rc = ngx_lua_ffi_ssl_get_client_hello_ciphers(r, usp,
173174
sizep, errmsg)
174175
if rc == FFI_OK then
175-
local array = intp[0]
176+
local array = usp[0]
176177
local size = tonumber(sizep[0])
177178
local ciphers_table = table_new(size, 0)
178179
for i=0, size-1, 1 do

0 commit comments

Comments
 (0)