Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Launch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ function launch:CheckForUpdate(inBackground)
self.updateProgress = "Checking..."
self.lastUpdateCheck = GetTime()
local update = io.open("UpdateCheck.lua", "r")
local id = LaunchSubScript(update:read("*a"), "GetScriptPath,GetRuntimePath,GetWorkDir,MakeDir", "ConPrintf,UpdateProgress", self.connectionProtocol, self.proxyURL)
local id = LaunchSubScript(update:read("*a"), "GetScriptPath,GetRuntimePath,GetWorkDir,MakeDir", "ConPrintf,UpdateProgress", self.connectionProtocol, self.proxyURL, self.noSSL or false)
if id then
self.subScripts[id] = {
type = "UPDATE"
Expand Down
5 changes: 5 additions & 0 deletions src/Modules/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ if arg and isValueInTable(arg, "--no-jit") then
ConPrintf("JIT Disabled")
end

if arg and isValueInTable(arg, "--no-ssl") then
launch.noSSL = true
ConPrintf("SSL verification disabled")
end

local tempTable1 = { }
local tempTable2 = { }

Expand Down
12 changes: 11 additions & 1 deletion src/UpdateCheck.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Module: Update Check
-- Checks for updates
--
local connectionProtocol, proxyURL = ...
local connectionProtocol, proxyURL, noSSL = ...

local xml = require("xml")
local sha1 = require("sha1")
Expand All @@ -28,6 +28,11 @@ local function downloadFileText(source, file)
if proxyURL then
easy:setopt(curl.OPT_PROXY, proxyURL)
end
if noSSL then
easy:setopt(curl.OPT_SSL_VERIFYPEER, 0)
easy:setopt(curl.OPT_SSL_VERIFYHOST, 0)
ConPrintf("SSL verification disabled")
end
easy:setopt_writefunction(function(data)
text = text..data
return true
Expand Down Expand Up @@ -59,6 +64,11 @@ local function downloadFile(source, file, outName)
if proxyURL then
easy:setopt(curl.OPT_PROXY, proxyURL)
end
if noSSL then
easy:setopt(curl.OPT_SSL_VERIFYPEER, 0)
easy:setopt(curl.OPT_SSL_VERIFYHOST, 0)
ConPrintf("SSL verification disabled")
end
local file = io.open(outName, "wb+")
easy:setopt_writefunction(file)
local _, error = easy:perform()
Expand Down