Skip to content

Commit

Permalink
Fix: use of SecureSocketsLayer on older SharePoint Versions than Subs…
Browse files Browse the repository at this point in the history
…cription Edition
  • Loading branch information
Hannappel, Christoph committed Mar 8, 2022
1 parent fe2111d commit 878fe84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- SPWebApplication
- Fixed an issue where the Set method tried to use the Parameter SecureSocketsLayer with Set-SPWebApplication on SharePoint Server older than Subscription Edition.

## [5.1.0] - 2022-02-24

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -618,10 +618,6 @@ function Set-TargetResource
{
$updateWebAppParams.Add("AllowLegacyEncryption", $params.AllowLegacyEncryption)
}
if ((New-Object -TypeName System.Uri $params.WebAppUrl).Scheme -eq "https")
{
$updateWebAppParams.Add("SecureSocketsLayer", $true)
}

$productVersion = Get-SPDscInstalledProductVersion
if ($productVersion.FileMajorPart -eq 16 -and `
Expand All @@ -636,6 +632,11 @@ function Set-TargetResource
{
$updateWebAppParams.Add("Port", $params.Port)
}

if ((New-Object -TypeName System.Uri $params.WebAppUrl).Scheme -eq "https")
{
$updateWebAppParams.Add("SecureSocketsLayer", $true)
}
}

Write-Verbose -Message "Updating web application with these parameters: $(Convert-SPDscHashtableToString -Hashtable $updateWebAppParams)"
Expand Down

0 comments on commit 878fe84

Please sign in to comment.