From de1772949405bffed0b130442267bd39a12403cd Mon Sep 17 00:00:00 2001 From: Brian Wuchner Date: Tue, 25 Jan 2022 09:59:05 -0500 Subject: [PATCH] Update SaltStackConfig.psm1 Changing SslProtocol parameter from static validateset list to proper type. Signed-off-by: Brian Wuchner --- Modules/SaltStackConfig/SaltStackConfig.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/SaltStackConfig/SaltStackConfig.psm1 b/Modules/SaltStackConfig/SaltStackConfig.psm1 index 0d7ce48..510ad29 100644 --- a/Modules/SaltStackConfig/SaltStackConfig.psm1 +++ b/Modules/SaltStackConfig/SaltStackConfig.psm1 @@ -37,7 +37,7 @@ Function Connect-SscServer { [Parameter(Mandatory=$false, Position=3)][string]$AuthSource='internal', [Parameter(Mandatory=$false, ParameterSetName='Credential')][PSCredential]$Credential, [Parameter(Mandatory=$false)][Switch]$SkipCertificateCheck, - [Parameter(Mandatory=$false)][ValidateSet('Tls13','Tls12','Tls11','Tls','SystemDefault')]$SslProtocol + [Parameter(Mandatory=$false)][System.Net.SecurityProtocolType]$SslProtocol ) if ($PSCmdlet.ParameterSetName -eq 'Credential' -AND $Credential -eq $null) { $Credential = Get-Credential} @@ -63,7 +63,7 @@ Function Connect-SscServer { } # end if SkipCertificate Check if ($SslProtocol) { - [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]$SslProtocol + [System.Net.ServicePointManager]::SecurityProtocol = $SslProtocol } $loginBody = @{'username'=$username; 'password'=$password; 'config_name'=$AuthSource}