Merge pull request #2405 from D-side/patch-1

Enforce TLS 1.2 for PowerShell downloader
This commit is contained in:
Phil Hagelberg 2018-03-01 10:21:07 -08:00 committed by GitHub
commit e944129b5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,7 +154,7 @@ if "x%HTTP_CLIENT%" == "x" goto TRY_POWERSHELL
call powershell -? >nul 2>&1
if NOT ERRORLEVEL 0 goto TRY_WGET
set LAST_HTTP_CLIENT=powershell
powershell -Command "& {param($a,$f) $client = New-Object System.Net.WebClient; $client.Proxy.Credentials =[System.Net.CredentialCache]::DefaultNetworkCredentials; $client.DownloadFile($a, $f)}" ""%2"" ""%1""
powershell -Command "& {param($a,$f) $client = New-Object System.Net.WebClient; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $client.Proxy.Credentials =[System.Net.CredentialCache]::DefaultNetworkCredentials; $client.DownloadFile($a, $f)}" ""%2"" ""%1""
SET RC=%ERRORLEVEL%
goto EXITRC