From 6be8ca5a8fd7ef5e4993ca8ca65e1f6a44c28c45 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 14 Aug 2019 09:30:16 +0100 Subject: [PATCH] [Minor] Allow no_ssl_verify similar to lua_http... --- src/lua/lua_tcp.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lua/lua_tcp.c b/src/lua/lua_tcp.c index e9dab0196..c5518450a 100644 --- a/src/lua/lua_tcp.c +++ b/src/lua/lua_tcp.c @@ -1583,6 +1583,15 @@ lua_tcp_request (lua_State *L) if (lua_type (L, -1) == LUA_TBOOLEAN) { ssl_noverify = lua_toboolean (L, -1); } + else { + /* Similar to lua http, meh... */ + lua_pushstring (L, "no_ssl_verify"); + lua_gettable (L, -2); + if (lua_type (L, -1) == LUA_TBOOLEAN) { + ssl_noverify = lua_toboolean (L, -1); + } + lua_pop (L, 1); + } lua_pop (L, 1); lua_pushstring (L, "on_connect"); -- 2.39.5