Fixes TLS error on old PowerShell versions for GitHub connections

Fixes #41
This commit is contained in:
Christian Stein 2020-02-07 11:21:53 +01:00
parent a724f486f8
commit 58d2aa7403

View file

@ -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) {