From 58d2aa7403cd678b3b22b424cf742c0e0251578f Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Fri, 7 Feb 2020 11:21:53 +0100 Subject: [PATCH] Fixes TLS error on old PowerShell versions for GitHub connections Fixes #41 --- lib/core/framework/Get-IcingaPowerShellModuleArchive.psm1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/core/framework/Get-IcingaPowerShellModuleArchive.psm1 b/lib/core/framework/Get-IcingaPowerShellModuleArchive.psm1 index aeabe5b..1746f6d 100644 --- a/lib/core/framework/Get-IcingaPowerShellModuleArchive.psm1 +++ b/lib/core/framework/Get-IcingaPowerShellModuleArchive.psm1 @@ -8,6 +8,8 @@ function Get-IcingaPowerShellModuleArchive() $ProgressPreference = "SilentlyContinue"; $Tag = 'master'; + # Fix TLS errors while connecting to GitHub with old PowerShell versions + [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11"; if ([string]::IsNullOrEmpty($DownloadUrl)) { if ((Get-IcingaAgentInstallerAnswerInput -Prompt ([string]::Format('Do you provide a custom repository for "{0}"?', $ModuleName)) -Default 'n').result -eq 1) {