fix typo security_protocols

pull/43346/head
Charles Crossan 8 years ago committed by Matt Clay
parent 35da8e8a04
commit fb6ef26e39

@ -68,14 +68,14 @@ if ($status_code) {
} }
# Enable TLS1.1/TLS1.2 if they're available but disabled (eg. .NET 4.5) # Enable TLS1.1/TLS1.2 if they're available but disabled (eg. .NET 4.5)
$security_protcols = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::SystemDefault $security_protocols = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::SystemDefault
if ([Net.SecurityProtocolType].GetMember("Tls11").Count -gt 0) { if ([Net.SecurityProtocolType].GetMember("Tls11").Count -gt 0) {
$security_protcols = $security_protcols -bor [Net.SecurityProtocolType]::Tls11 $security_protocols = $security_protocols -bor [Net.SecurityProtocolType]::Tls11
} }
if ([Net.SecurityProtocolType].GetMember("Tls12").Count -gt 0) { if ([Net.SecurityProtocolType].GetMember("Tls12").Count -gt 0) {
$security_protcols = $security_protcols -bor [Net.SecurityProtocolType]::Tls12 $security_protocols = $security_protocols -bor [Net.SecurityProtocolType]::Tls12
} }
[Net.ServicePointManager]::SecurityProtocol = $security_protcols [Net.ServicePointManager]::SecurityProtocol = $security_protocols
$client = [System.Net.WebRequest]::Create($url) $client = [System.Net.WebRequest]::Create($url)
$client.Method = $method $client.Method = $method

Loading…
Cancel
Save