Commit bf66f2d5 authored by Bruce Dawson's avatar Bruce Dawson Committed by LUCI CQ

Allow TLS 1.2 and print error codes

An external developer reported that gclient sync fails on Windows 8.1
unless TLS 1.2 is explicitly enabled. This allows that security protocol
and prints a more detailed error message on failures.

Change-Id: I07ab832d4f922264a1ee1890f9b71949a313a7ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2480605
Commit-Queue: Anthony Polito <apolito@google.com>
Reviewed-by: 's avatarAnthony Polito <apolito@google.com>
parent b3a1dbae
......@@ -111,9 +111,13 @@ try {
$wc = (New-Object System.Net.WebClient)
$wc.Headers.Add("User-Agent", $UserAgent)
try {
# Download failures were reported on Windows 8.1 without this line.
[System.Net.ServicePointManager]::SecurityProtocol = `
[System.Net.SecurityProtocolType]::Tls12
$wc.DownloadFile($URL, $TmpPath)
} catch {
throw "Failed to download the file, check your network connection"
$err = $_.Exception.Message
throw "Failed to download the file, check your network connection, $err"
}
$ActualSHA256 = Get-Actual-SHA256 $TmpPath
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment