mirror of
https://github.com/actions/runner-images.git
synced 2025-12-16 06:40:32 +00:00
19 lines
509 B
PowerShell
19 lines
509 B
PowerShell
################################################################################
|
|
## File: Validate-DotnetTLS.ps1
|
|
## Desc: Validate DotNetFramework security protocol to TLS 1.2
|
|
################################################################################
|
|
|
|
$protocols = [Net.ServicePointManager]::SecurityProtocol
|
|
$protocolArr = $protocols -split ', '
|
|
if ($protocolArr.Contains('Tls12'))
|
|
{
|
|
Write-Host 'Tls 1.2 has been enabled.'
|
|
}
|
|
else
|
|
{
|
|
Write-Host 'Tls 1.2 has not been enabled.'
|
|
exit 1
|
|
}
|
|
|
|
|