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

xWebApplication SSL Flags produce an error #232

Closed
bswerdlen opened this issue Sep 15, 2016 · 1 comment · Fixed by #275
Closed

xWebApplication SSL Flags produce an error #232

bswerdlen opened this issue Sep 15, 2016 · 1 comment · Fixed by #275
Labels
enhancement The issue is an enhancement request.

Comments

@bswerdlen
Copy link

bswerdlen commented Sep 15, 2016

In my testing, whenever I try to apply SSL Flags to a web application I receive the following error:
Flags must be some combination of None, Ssl, SslNegotiateCert, SslRequireCert, Ssl128
+ CategoryInfo : NotSpecified: (:) [], CimException

When I run the code manually I can pinpoint the error at
Set-WebConfigurationProperty : Flags must be some combination of None, Ssl, SslNegotiateCert, SslRequireCert, Ssl128
At line:9 char:17

  •             Set-WebConfigurationProperty @params
    

Reviewing the code being run it is currently configured as:
Write-Verbose -Message ($LocalizedData.VerboseSetTargetSslFlags -f $Name)
$params = @{
PSPath = 'MACHINE/WEBROOT/APPHOST'
Location = "${Website}/${Name}"
Filter = 'system.webServer/security/access'
Name = 'sslFlags'
Value = [string]$sslflags
}

            Set-WebConfigurationProperty @params

This appears to be happening because the sslFlags are expected to be separated by comma's, not spaces

When I change the code fragment above to the one below, everything works as expected:
Write-Verbose -Message ($LocalizedData.VerboseSetTargetSslFlags -f $Name)
$params = @{
PSPath = 'MACHINE/WEBROOT/APPHOST'
Location = "${Website}/${Name}"
Filter = 'system.webServer/security/access'
Name = 'sslFlags'
Value = [string]($sslflags -join)
}

            Set-WebConfigurationProperty @params
@bswerdlen
Copy link
Author

whoops, the fix didn't copy across correctly
Write-Verbose -Message ($LocalizedData.VerboseSetTargetSslFlags -f $Name)
$params = @{
PSPath = 'MACHINE/WEBROOT/APPHOST'
Location = "${Website}/${Name}"
Filter = 'system.webServer/security/access'
Name = 'sslFlags'
Value = ($sslflags -join ',')
}

Set-WebConfigurationProperty @params

@kwirkykat kwirkykat added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Sep 20, 2016
remcoeissing added a commit to remcoeissing/xWebAdministration that referenced this issue Dec 31, 2016
Updated xWebApplication unit tests, the test for SSLFlags where not testing this property.
@vors vors removed the help wanted The issue is up for grabs for anyone in the community. label Jan 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request.
Projects
None yet
3 participants