From 24ac64d083436e448af0de45f6d5280e847a26a3 Mon Sep 17 00:00:00 2001 From: Daniel Lo Nigro Date: Tue, 27 Feb 2018 13:49:11 -0800 Subject: [PATCH] Enforce usage of TLS 1.2 when building Chocolatey package --- scripts/build-chocolatey.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/build-chocolatey.ps1 b/scripts/build-chocolatey.ps1 index c952a589ad..081b627285 100644 --- a/scripts/build-chocolatey.ps1 +++ b/scripts/build-chocolatey.ps1 @@ -7,6 +7,10 @@ param( $ErrorActionPreference = 'Stop'; # stop on all errors +# Enforce usage of TLS 1.2, as GitHub requires it. PowerShell uses TLS 1.0 by +# default, which causes "Could not create SSL/TLS secure channel" errors +[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; + if ($Env:YARN_RC -eq 'true') { Write-Output 'This is an RC release; Chocolatey will not be updated' Exit