зеркало из https://github.com/microsoft/msquic.git
Per-Platform TLS Defaults in PowerShell Scripts (#353)
This commit is contained in:
Родитель
1a4be0d89c
Коммит
970916f3d1
|
@ -58,7 +58,7 @@ param (
|
|||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[ValidateSet("schannel", "openssl", "stub", "mitls")]
|
||||
[string]$Tls = "schannel",
|
||||
[string]$Tls = $null,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[switch]$DisableLogs = $false,
|
||||
|
@ -85,6 +85,15 @@ param (
|
|||
Set-StrictMode -Version 'Latest'
|
||||
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
|
||||
|
||||
# Default TLS based on current platform.
|
||||
if ($null -eq $Tls) {
|
||||
if ($IsWindows) {
|
||||
$Tls = "schannel"
|
||||
} else {
|
||||
$Tls = "openssl"
|
||||
}
|
||||
}
|
||||
|
||||
# Root directory of the project.
|
||||
$RootDir = Split-Path $PSScriptRoot -Parent
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ param (
|
|||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[ValidateSet("schannel", "openssl", "stub", "mitls")]
|
||||
[string]$Tls = "schannel",
|
||||
[string]$Tls = $null,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[switch]$KeepOutputOnSuccess = $false,
|
||||
|
@ -62,6 +62,15 @@ param (
|
|||
Set-StrictMode -Version 'Latest'
|
||||
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
|
||||
|
||||
# Default TLS based on current platform.
|
||||
if ($null -eq $Tls) {
|
||||
if ($IsWindows) {
|
||||
$Tls = "schannel"
|
||||
} else {
|
||||
$Tls = "openssl"
|
||||
}
|
||||
}
|
||||
|
||||
# Root directory of the project.
|
||||
$RootDir = Split-Path $PSScriptRoot -Parent
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ param (
|
|||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[ValidateSet("schannel", "openssl", "stub", "mitls")]
|
||||
[string]$Tls = "schannel",
|
||||
[string]$Tls = $null,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[Int32]$Timeout = 60000,
|
||||
|
@ -68,6 +68,15 @@ param (
|
|||
Set-StrictMode -Version 'Latest'
|
||||
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
|
||||
|
||||
# Default TLS based on current platform.
|
||||
if ($null -eq $Tls) {
|
||||
if ($IsWindows) {
|
||||
$Tls = "schannel"
|
||||
} else {
|
||||
$Tls = "openssl"
|
||||
}
|
||||
}
|
||||
|
||||
# Root directory of the project.
|
||||
$RootDir = Split-Path $PSScriptRoot -Parent
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ param (
|
|||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[ValidateSet("schannel", "openssl", "stub", "mitls")]
|
||||
[string]$Tls = "schannel",
|
||||
[string]$Tls = $null,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$Filter = "",
|
||||
|
@ -131,6 +131,15 @@ param (
|
|||
Set-StrictMode -Version 'Latest'
|
||||
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
|
||||
|
||||
# Default TLS based on current platform.
|
||||
if ($null -eq $Tls) {
|
||||
if ($IsWindows) {
|
||||
$Tls = "schannel"
|
||||
} else {
|
||||
$Tls = "openssl"
|
||||
}
|
||||
}
|
||||
|
||||
# Root directory of the project.
|
||||
$RootDir = Split-Path $PSScriptRoot -Parent
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче