Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SChannelSettings: Test-TargetResource always fails if current state only defined one WinHttpDefaultSecureProtocols #28

Closed
johlju opened this issue May 17, 2022 · 0 comments · Fixed by #29

Comments

@johlju
Copy link
Member

johlju commented May 17, 2022

Problem description

The Test-TargetResource will always fail if the current state has only defined one WinHttpDefaultSecureProtocols, e.g. 'TLS1.2'. This is because Get-TargetResource does not return a string array for the property WinHttpDefaultSecureProtocols resulting in that Test-TargetResource compares the array @('TLS1.2') against @('T','L','S','1','.','2').

Verbose logs

Not available (debugged but forgot to save the logs)

DSC configuration

SChannelSettings 'ConfigureWinHTTPProtocols'
{
    IsSingleInstance              = 'Yes'
    WinHttpDefaultSecureProtocols = @('TLS1.2')
}

Suggested solution

Convert the value:.

WinHttpDefaultSecureProtocols = $winhttpProtocols

to an array

WinHttpDefaultSecureProtocols   = @($winhttpProtocols)

Operating system the target node is running

Windows Server 2022

PowerShell version and build the target node is running

WMF 5.1

SChannelDsc version

v1.3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant