mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2025-12-15 00:35:47 -07:00
Adjustments to Update.ps1
This commit is contained in:
14
Update.ps1
14
Update.ps1
@@ -486,7 +486,19 @@ function Initialize-BorealisTlsContext {
|
|||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 -bor [System.Net.SecurityProtocolType]::Tls11
|
$protocolType = [System.Net.SecurityProtocolType]
|
||||||
|
$hasSystemDefault = [System.Enum]::IsDefined($protocolType, 'SystemDefault')
|
||||||
|
if ($hasSystemDefault) {
|
||||||
|
# Allow the OS to negotiate the strongest available protocol (TLS 1.3 on modern hosts).
|
||||||
|
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::SystemDefault
|
||||||
|
} else {
|
||||||
|
$protocol = [System.Net.SecurityProtocolType]::Tls12 -bor [System.Net.SecurityProtocolType]::Tls11
|
||||||
|
if ([System.Enum]::IsDefined($protocolType, 'Tls13')) {
|
||||||
|
$tls13 = [System.Enum]::Parse($protocolType, 'Tls13')
|
||||||
|
$protocol = $protocol -bor $tls13
|
||||||
|
}
|
||||||
|
[System.Net.ServicePointManager]::SecurityProtocol = $protocol
|
||||||
|
}
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
if (-not $script:BorealisCallbackApplied) {
|
if (-not $script:BorealisCallbackApplied) {
|
||||||
|
|||||||
Reference in New Issue
Block a user