Skip to content

Commit 645f6c9

Browse files
committed
Merge pull request #2 from nkindberg/master
Fix reboot logic in SSLConfigure.ps1
2 parents 4395ef4 + e48a536 commit 645f6c9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

AzureCloudServiceSample/WebRoleSample/Startup/SSLConfigure.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Function DisableRC4 {
4949
$k4 = $ciphers.CreateSubKey("RC4 40/128")
5050
$k4.SetValue("Enabled", 0, [Microsoft.Win32.RegistryValueKind]::DWord)
5151
}
52+
53+
$restart
5254
}
5355

5456
Function Set-CryptoSetting {
@@ -79,6 +81,8 @@ Function Set-CryptoSetting {
7981
$restart = $True
8082
}
8183
}
84+
85+
$restart
8286
}
8387

8488
# Check for existence of parent registry keys (SSL 2.0 and SSL 3.0), and create if they do not exist
@@ -100,24 +104,23 @@ $reboot = Set-CryptoSetting 13 DisabledByDefault 1 DWord $reboot
100104
# Ensure SSL 3.0 disabled for server
101105
$reboot = Set-CryptoSetting 14 Enabled 0 DWord $reboot
102106

103-
DisableRC4($reboot)
107+
$reboot = DisableRC4($reboot)
104108

105109
If ($SetCipherOrder) {
106110
If (!(Test-Path -Path $regkeys[15])) {
107111
New-Item $regkeys[15] | Out-Null
108-
$restart = $True
112+
$reboot = $True
109113
}
110114

111115
$val = (Get-Item -Path $regkeys[15] -ErrorAction SilentlyContinue).GetValue("Functions", $null)
112116

113117
if ($val -ne $cipherorder)
114118
{
115119
Set-ItemProperty -Path $regkeys[15] -Name Functions -Value $cipherorder
116-
$restart = $True
120+
$reboot = $True
117121
}
118122
}
119123

120-
121124
# If any settings were changed, reboot
122125
If ($reboot) {
123126
Write-Host "Rebooting now..."

0 commit comments

Comments
 (0)