init.lua

changeset 152
902544037000
parent 149
de10599d1ed4
child 170
eae589a33624
--- a/init.lua	Mon Sep 17 14:46:47 2018 +0100
+++ b/init.lua	Thu Jun 11 15:27:55 2020 +0100
@@ -110,7 +110,17 @@
 		io.write("Enter the password for "..config.jid..": ");
 		config.password = io.read("*l");
 	end
-	
+
+	-- Initialize the HTTP client
+	local http = require "net.http";
+	http.default.options.sslctx = {
+		mode = "client";
+		protocol = "sslv23";
+		capath = config.capath or "/etc/ssl/certs";
+		cafile = config.cafile;
+		verify = "peer";
+	};
+
 	-- Create the stream object and bot object
 	local c = verse.new();
 	local b = riddim.new(c, config);

mercurial