From 3d489152ee444a826465145d04da6e049cb4f250 Mon Sep 17 00:00:00 2001 From: Robert McLeod Date: Fri, 21 Aug 2020 15:19:46 +1000 Subject: [PATCH] Use binary or operator for enabling TLS1.2 (#6) Using `+=` technically works once but will keep incrementing the value enabling other versions and then overflowing. Not really sure why I used it. --- functions/Invoke-Method.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/Invoke-Method.ps1 b/functions/Invoke-Method.ps1 index 329679a..3ff8475 100644 --- a/functions/Invoke-Method.ps1 +++ b/functions/Invoke-Method.ps1 @@ -87,7 +87,7 @@ function Invoke-Method { $uri = 'https://cloud.tenable.com/' + $Path.TrimStart('/') - [Net.ServicePointManager]::SecurityProtocol += [System.Net.SecurityProtocolType]::Tls12 + [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 $multiplier = 0.5 while (-not [String]::IsNullOrEmpty($uri)) {