Skip to content

Commit 19438b7

Browse files
committed
Small update for zScalers dynamic certificates (IPS)
1 parent 0ca673a commit 19438b7

File tree

2 files changed

+22
-25
lines changed

2 files changed

+22
-25
lines changed

Intune/IntuneNetworkRequirements/Get-IntuneNetworkRequirements.ps1

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -706,8 +706,6 @@ function Test-SSL {
706706
if ($SSLStream.IsAuthenticated) {
707707
$SSLTest = $true
708708
$CertInfo = New-Object -TypeName Security.Cryptography.X509Certificates.X509Certificate2($SSLStream.RemoteCertificate)
709-
#CLEANUP
710-
#$Test = New-Object -TypeName System.Net.Security.SslStreamCertificateContext.create($CertInfo)
711709
if ($CertInfo.Thumbprint -and $CheckCertRevocation) {
712710
Write-Log -Message "Grabbing CRL for $SSLTarget and verify against known-good" -Component 'TestSSL'
713711
$CRLURIarray = $CertInfo.Extensions | Where-Object -FilterScript { $_.Oid.Value -eq '2.5.29.31' } | ForEach-Object -Process { $_.Oid.FriendlyName; $_.Format($true) }
@@ -724,17 +722,17 @@ function Test-SSL {
724722
Write-Log "SSL Inspection very likely. $SSLTarget is not a known CRL address" -Component 'TestSSL' -Type 2
725723
$SSLInspectionResult = $true
726724
}
727-
} elseif ($CRLURIarray[1].split('[').count -eq 2) {
728-
$CRLURI = $CRLURIarray[1].Split('http://')[1].split('/')[0]
729-
$KnownCRL = Test-SSLInspectionByKnownCRLs -CRLURL $CRLURI
730-
if (-not($KnownCRL)) {
731-
Write-Log "Unknown CRL. $SSLTarget's certificate didn't provide any known CRL address" -Component 'TestSSL' -Type 2
725+
} elseif ($CRLURIarray[1].split('[').count -ge 2) {
726+
if ($CRLURIarray[1].split('[').count -eq 2) {
727+
$CRLURI = $CRLURIarray[1].Split('http://')[1].split('/')[0]
728+
$KnownCRL = Test-SSLInspectionByKnownCRLs -CRLURL $CRLURI
729+
} elseif ($CRLURIarray[1].split('[').count -gt 2) {
730+
$TestMultipleCRLs = $CRLURIarray[1].split('=').split('[').trim() | Where-Object { $_.startswith("http://") } | ForEach-Object { Test-SSLInspectionByKnownCRLs -CRLURL $_.Split('http://')[1].split('/')[0] } | Where-Object { $_ -contains $true }
731+
if ($TestMultipleCRLs) { $KnownCRL = $true }
732732
}
733-
} elseif ($CRLURIarray[1].split('[').count -gt 2) {
734-
$TestMultipleCRLs = $CRLURIarray[1].split('=').split('[').trim() | Where-Object { $_.startswith("http://") } | ForEach-Object { Test-SSLInspectionByKnownCRLs -CRLURL $_.Split('http://')[1].split('/')[0] } | Where-Object { $_ -contains $true }
735-
if ($TestMultipleCRLs) { $KnownCRL = $true }
736733
if (-not($KnownCRL)) {
737-
Write-Log "Unknown CRLs. $SSLTarget's certificate didn't provide any known CRL addresses" -Component 'TestSSL' -Type 2
734+
Write-Log "Unknown CRL. $SSLTarget's certificate didn't provide any known CRL address" -Component 'TestSSL' -Type 2
735+
$SSLInspectionResult = $true
738736
}
739737
}
740738
}
@@ -1741,19 +1739,19 @@ function Test-Intune {
17411739
Test-Network $IntTarget
17421740
}
17431741
$resultlist = @{
1744-
TestWindowsActivation = Test-Autopilot
1745-
EntraIDTest = Test-RemoteHelp
1746-
WNSTest = Test-WNS
1747-
DOTest = Test-DeliveryOptimization
1748-
AppleTest = Test-Apple
1749-
AndroidTest = Test-Android
1750-
StoreTest = Test-MicrosoftStore
1751-
DeviceHealth = Test-DeviceHealth
1752-
WUTest = Test-WindowsUpdate
1753-
EndpAnalytics = Test-EndpointAnalytics
1742+
TestAutoPilot = Test-Autopilot
1743+
EntraIDTest = Test-RemoteHelp
1744+
WNSTest = Test-WNS
1745+
DOTest = Test-DeliveryOptimization
1746+
AppleTest = Test-Apple
1747+
AndroidTest = Test-Android
1748+
StoreTest = Test-MicrosoftStore
1749+
DeviceHealth = Test-DeviceHealth
1750+
WUTest = Test-WindowsUpdate
1751+
EndpAnalytics = Test-EndpointAnalytics
17541752
#MDE = Test-MDE #Not done!
1755-
DiagnosticsDataTest = Test-DiagnosticsData
1756-
NTPTest = Test-NTP
1753+
DiagnosticsDataTest = Test-DiagnosticsData
1754+
NTPTest = Test-NTP
17571755
}
17581756
if ($resultlist.values -contains $false) {
17591757
Write-Log -Message "$resultlist" -Component "Test$ServiceArea" -Type 3
@@ -1817,7 +1815,6 @@ function Merge-ResultFiles {
18171815
Write-Log "File $($CSVPath) not found" -Component 'MergeResultFiles' -Type 3
18181816
return $false
18191817
}
1820-
#$culture = [cultureinfo]::InvariantCulture
18211818
$culture = [Globalization.CultureInfo]::CreateSpecificCulture('de-DE')
18221819
$TimeStamp = Get-Date([DateTime]::ParseExact("$($CSVPath.name.Replace('ResultList_','').substring(0,15))", 'yyyyMMdd_HHmmss', $culture)) -Format "dd.MM.yyyy HH:mm:ss"
18231820
$CSVComputername = $($CSVPath.name.Split('_')[3].split('.')[0])

Intune/IntuneNetworkRequirements/INRCustomList.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"orgc3-crl.verisign.com", 80, TCP, 9993
6262
"crl.entrust.net", 80, TCP, 9993
6363
"ocsp.entrust.net", 80, TCP, 9993
64-
"management.core.windows.net", 443, TCP, 9990
64+
"crl.sectigo.com", 80, TCP, 9993
6565
"graph.windows.net", 443, TCP, 9990
6666
"graph.windows.net", 443, TCP, 9988
6767
"secure.aadcdn.microsoftonline-p.com", 443, TCP, 9990

0 commit comments

Comments
 (0)