254254function launch :DownloadPage (url , callback , params )
255255 params = params or {}
256256 local script = [[
257- local url, requestHeader, requestBody, connectionProtocol, proxyURL = ...
257+ local url, requestHeader, requestBody, connectionProtocol, proxyURL, noSSL = ...
258258 local responseHeader = ""
259259 local responseBody = ""
260260 ConPrintf("Downloading page at: %s", url)
@@ -281,6 +281,10 @@ function launch:DownloadPage(url, callback, params)
281281 if proxyURL then
282282 easy:setopt(curl.OPT_PROXY, proxyURL)
283283 end
284+ if noSSL then
285+ easy:setopt(curl.OPT_SSL_VERIFYPEER, 0)
286+ easy:setopt(curl.OPT_SSL_VERIFYHOST, 0)
287+ end
284288 easy:setopt_headerfunction(function(data)
285289 responseHeader = responseHeader .. data
286290 return true
@@ -303,7 +307,7 @@ function launch:DownloadPage(url, callback, params)
303307 ConPrintf("Download complete. Status: %s", errMsg or "OK")
304308 return responseBody, errMsg, responseHeader
305309 ]]
306- local id = LaunchSubScript (script , " " , " ConPrintf" , url , params .header , params .body , self .connectionProtocol , self .proxyURL )
310+ local id = LaunchSubScript (script , " " , " ConPrintf" , url , params .header , params .body , self .connectionProtocol , self .proxyURL , self . noSSL or false )
307311 if id then
308312 self .subScripts [id ] = {
309313 type = " DOWNLOAD" ,
@@ -337,7 +341,7 @@ function launch:CheckForUpdate(inBackground)
337341 self .updateProgress = " Checking..."
338342 self .lastUpdateCheck = GetTime ()
339343 local update = io.open (" UpdateCheck.lua" , " r" )
340- local id = LaunchSubScript (update :read (" *a" ), " GetScriptPath,GetRuntimePath,GetWorkDir,MakeDir" , " ConPrintf,UpdateProgress" , self .connectionProtocol , self .proxyURL )
344+ local id = LaunchSubScript (update :read (" *a" ), " GetScriptPath,GetRuntimePath,GetWorkDir,MakeDir" , " ConPrintf,UpdateProgress" , self .connectionProtocol , self .proxyURL , self . noSSL or false )
341345 if id then
342346 self .subScripts [id ] = {
343347 type = " UPDATE"
0 commit comments