提交 0e17d138 编写于 作者: J Joao Moreno

use strictSSL on windows update download call

上级 f8e85f50
......@@ -58,7 +58,7 @@ export class Win32AutoUpdaterImpl extends events.EventEmitter {
this.emit('checking-for-update');
const proxyUrl = Settings.getValue('http.proxy');
const strictSSL = Settings.getValue('http.proxy.strictSSL', true);
const strictSSL = Settings.getValue('http.proxyStrictSSL', true);
const agent = getProxyAgent(this.url, { proxyUrl, strictSSL });
this.currentRequest = json<IUpdate>({ url: this.url, agent })
......@@ -77,10 +77,11 @@ export class Win32AutoUpdaterImpl extends events.EventEmitter {
return TPromise.as(updatePackagePath);
}
const url = update.url;
const downloadPath = `${updatePackagePath}.tmp`;
const agent = getProxyAgent(update.url, { proxyUrl, strictSSL });
const agent = getProxyAgent(url, { proxyUrl, strictSSL });
return download(downloadPath, { url: update.url, agent })
return download(downloadPath, { url, agent, strictSSL })
.then(() => pfs.rename(downloadPath, updatePackagePath))
.then(() => updatePackagePath);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册