Uses TLS 1.2 on Windows during Start-PSBootstrap (#6235)

* Fixed TLS version error on Windows when building PowerShell
This commit is contained in:
Joel Joseprabu 2018-02-24 13:01:37 -06:00 committed by Sergei Vorobev
parent b8a8e8e247
commit a7271804f9

View File

@ -1683,6 +1683,10 @@ function Start-PSBootstrap {
log "Install RCEdit for modifying exe resources"
$rceditUrl = "https://github.com/electron/rcedit/releases/download/v1.0.0/rcedit-x64.exe"
New-Item -Path "~/.rcedit" -Type Directory -Force > $null
## need to specify TLS version 1.2 since GitHub API requires it
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -OutFile "~/.rcedit/rcedit-x64.exe" -Uri $rceditUrl
}