mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
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: Anthony Polito <apolito@google.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user