commit 6be8ca5: [Minor] Allow no_ssl_verify similar to lua_http...

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Aug 14 09:00:05 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-08-14 09:30:16 +0100
URL: https://github.com/rspamd/rspamd/commit/6be8ca5a8fd7ef5e4993ca8ca65e1f6a44c28c45

[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");


More information about the Commits mailing list