From 7dac11392b7bd7f80767e48d1afa00cf9895c1ab Mon Sep 17 00:00:00 2001 From: Jason Malinowski Date: Thu, 26 Jul 2018 15:44:35 -0700 Subject: [PATCH] Make sure TLS 1.2 is used to fetch from https://dot.net https://github.com/dotnet/announcements/issues/77 for the change and where I am stealing this change from. --- build/scripts/build-utils.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/build/scripts/build-utils.ps1 b/build/scripts/build-utils.ps1 index 8e74e71e9186c..7b628e93628fc 100644 --- a/build/scripts/build-utils.ps1 +++ b/build/scripts/build-utils.ps1 @@ -148,6 +148,7 @@ function Ensure-DotnetSdk() { Create-Directory $cliDir Create-Directory $toolsDir $destFile = Join-Path $toolsDir "dotnet-install.ps1" + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $webClient = New-Object -TypeName "System.Net.WebClient" $webClient.DownloadFile("https://dot.net/v1/dotnet-install.ps1", $destFile) Exec-Block { & $destFile -Version $sdkVersion -InstallDir $cliDir } | Out-Null