Skip to content

Commit 2738198

Browse files
authored
Merge pull request dotnet-script#232 from filipw/bugfix/tls1.2
Enforce TLS 1.2 in powershell
2 parents 1f1d5b6 + 696e0d6 commit 2738198

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

build/install-dotnet-script.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
2+
13
$scriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
24
$client = New-Object "System.Net.WebClient"
35
$url = "https://github.com/filipw/dotnet-script/releases/download/0.18.0/dotnet-script.0.18.0.zip"
46
$file = "$scriptRoot/dotnet-script.zip"
57
$client.DownloadFile($url,$file)
6-
Expand-Archive $file -DestinationPath $scriptRoot -Force
7-
8+
Expand-Archive $file -DestinationPath $scriptRoot -Force

install/install.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
2+
13
# Create a temporary folder to download to.
24
$tempFolder = Join-Path $env:TEMP "dotnet-script"
35
New-Item $tempFolder -ItemType Directory -Force
@@ -9,7 +11,7 @@ Select-Object tag_name
911
$tag_name = $latestRelease.tag_name
1012

1113
# Download the zip
12-
Write-Host "Downloading latest verson ($tag_name)"
14+
Write-Host "Downloading latest version ($tag_name)"
1315
$client = New-Object "System.Net.WebClient"
1416
$url = "https://github.com/filipw/dotnet-script/releases/download/$tag_name/dotnet-script.$tag_name.zip"
1517
$zipFile = Join-Path $tempFolder "dotnet-script.zip"
@@ -28,3 +30,5 @@ $paths += Join-Path $installationFolder "dotnet-script"
2830
$path = $paths -join ";"
2931

3032
[System.Environment]::SetEnvironmentVariable("path", $path, [System.EnvironmentVariableTarget]::User)
33+
34+
Write-Host "Successfully installed version ($tag_name)"

0 commit comments

Comments
 (0)