# HG changeset patch # User Matthew Wild # Date 1591885675 -3600 # Node ID 902544037000d47eb3d10bafd4f9f6cd5ede7a83 # Parent 936364f8efcf9b1be1f9c5740f1035db7b33e7db init.lua: Initialize net.http with an SSL configuration diff -r 936364f8efcf -r 902544037000 init.lua --- 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);