-
Notifications
You must be signed in to change notification settings - Fork 545
Closed
Description
Description of Issue/Question
In salt-bootstrap.ps1, the System.Net.SecurityProtoclType::Tls1 and System.Net.SecurityProtoclType::Tls2 enumerations do not exist on .NET Framework 4.0. This means the following line of code at salt-bootstrap.ps1:102 has an undocumented dependency;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12''
This results in the following error/backtrace:
Cannot convert value "Tls,Tls11,Tls12" to type "System.Net.SecurityProtocolType due to invalid enumeration values. Specify one of the following enumeration values and try again. The possible enumeration values are "Ssl3, Tls".
Downloading Salt minion installer Salt-Minion--AMD64-Setup.exe
At C:\Users\vagrant\AppData\Local\Temp\salt\bootstrap-salt.ps1:103 char:87
+ [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType] <<<< 'Tls,Tls11,Tls12'
+ CategoryInfo : NotSpecified: (:) [], RuntimeException
+ FullyQualifiedErrorId : RuntimeException
You could wrap it in an exception handler and assign the constants directly to remain independent of the available .NET framework versions.
System.Net.SecurityProtocolType.Ssl3 -- 48 -- 0x30
System.Net.SecurityProtocolType.Tls -- 192 -- 0xC0
System.Net.SecurityProtocolType.Tls11 -- 768 -- 0x300
System.Net.SecurityProtocolType.Tls12 -- 3072 -- 0xC00
Setup
Use .NET Framework 4.0
Steps to Reproduce Issue
Run salt-bootstrap.ps1
Versions and Systems
Salt-Bootstrap.ps1 doesn't have a version parameter, but the url it's being requested from is https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.ps1, and the latest commit is c252c74.
Metadata
Metadata
Assignees
Labels
No labels