]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Allow no_ssl_verify similar to lua_http...
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 14 Aug 2019 08:30:16 +0000 (09:30 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 14 Aug 2019 08:30:16 +0000 (09:30 +0100)
src/lua/lua_tcp.c

index e9dab0196f10dea98adfa783edb9973bbf7578bb..c5518450af0b081c44003039b6585fc0f650503b 100644 (file)
@@ -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");