Skip to content

Commit d4955c0

Browse files
committed
reuse array to store cert/pkey
1 parent 11a7981 commit d4955c0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ngx_http_lua_socket_tcp.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ enum {
160160
SOCKET_CONNECT_TIMEOUT_INDEX = 2,
161161
SOCKET_SEND_TIMEOUT_INDEX = 4,
162162
SOCKET_READ_TIMEOUT_INDEX = 5,
163+
SOCKET_CLIENT_CERT_INDEX = 6 ,
164+
SOCKET_CLIENT_PKEY_INDEX = 7 ,
163165
};
164166

165167

@@ -424,7 +426,7 @@ ngx_http_lua_socket_tcp(lua_State *L)
424426

425427
ngx_http_lua_check_context(L, ctx, NGX_HTTP_LUA_CONTEXT_YIELDABLE);
426428

427-
lua_createtable(L, 5 /* narr */, 3 /* nrec */);
429+
lua_createtable(L, 7 /* narr */, 1 /* nrec */);
428430
lua_pushlightuserdata(L, ngx_http_lua_lightudata_mask(
429431
tcp_socket_metatable_key));
430432
lua_rawget(L, LUA_REGISTRYINDEX);

0 commit comments

Comments
 (0)