Skip to content

Commit

Permalink
Added TLS 1.3 support 🔒
Browse files Browse the repository at this point in the history
  • Loading branch information
blakedrumm authored Apr 19, 2024
1 parent b578944 commit 977ea14
Showing 1 changed file with 43 additions and 38 deletions.
81 changes: 43 additions & 38 deletions Powershell/Get-TLSRegistryKeys.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
.NOTES
Original Author: Mike Kallhoff
Author: Blake Drumm ([email protected])
Modified: November 8th, 2023
Website: https://blakedrumm.com/
Modified: April 18th, 2024
Hosted here: https://github.com/blakedrumm/SCOM-Scripts-and-SQL/blob/master/Powershell/Get-TLSRegistryKeys.ps1
#>
[CmdletBinding()]
Expand Down Expand Up @@ -84,7 +85,7 @@ Function Get-TLSRegistryKeys
}
}
$finalData = @()
$ProtocolList = "TLS 1.0", "TLS 1.1", "TLS 1.2"
$ProtocolList = "TLS 1.0", "TLS 1.1", "TLS 1.2", "TLS 1.3"
$ProtocolSubKeyList = "Client", "Server"
$DisabledByDefault = "DisabledByDefault"
$Enabled = "Enabled"
Expand All @@ -103,8 +104,8 @@ Function Get-TLSRegistryKeys
$localresults = @()
if (!(Test-Path $currentRegPath))
{
$IsDisabledByDefault = "Null"
$IsEnabled = "Null"
$IsDisabledByDefault = "DoesntExist"
$IsEnabled = "DoesntExist"
}
else
{
Expand All @@ -129,38 +130,42 @@ Function Get-TLSRegistryKeys
}
$localresults = "PipeLineKickStart" | Select-Object @{ n = 'Protocol'; e = { $Protocol } },
@{ n = 'Type'; e = { $key } },
@{ n = 'DisabledByDefault'; e = {
$output = ($IsDisabledByDefault).ToString()
if ($output -eq '0')
{
$output.Replace('0', 'False').Replace('1', 'True')
}
elseif ($output -eq '$0xffffffff')
{
"$output (True)"
}
else
{
$output
}

} },
@{ n = 'IsEnabled'; e = {
$output = ($IsEnabled).ToString()
if ($output -eq '0')
{
$output.Replace('0', 'False').Replace('1', 'True')
}
elseif ($output -eq '$0xffffffff')
{
"$output (True)"
}
else
{
$output
}

} }
@{
n = 'DisabledByDefault'; e = {
$output = ($IsDisabledByDefault).ToString()
if ($output -eq '0')
{
$output.Replace('0', 'False').Replace('1', 'True')
}
elseif ($output -eq '$0xffffffff')
{
"$output (True)"
}
else
{
$output
}

}
},
@{
n = 'IsEnabled'; e = {
$output = ($IsEnabled).ToString()
if ($output -eq '0')
{
$output.Replace('0', 'False').Replace('1', 'True')
}
elseif ($output -eq '$0xffffffff')
{
"$output (True)"
}
else
{
$output
}

}
}
$finalData += $localresults
}
}
Expand Down Expand Up @@ -265,8 +270,8 @@ Function Get-TLSRegistryKeys
$localresults = @()
if (!(Test-Path $currentRegPath))
{
$IsDisabledByDefault = "Null"
$IsEnabled = "Null"
$IsDisabledByDefault = "Not Present"
$IsEnabled = "Not Present"
}
else
{
Expand Down

0 comments on commit 977ea14

Please sign in to comment.