summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaleb Webber <seeplusplus@users.noreply.github.com>2018-07-23 10:28:42 -0400
committerMathew Robinson <chasinglogic@gmail.com>2018-12-28 11:29:40 -0500
commit908652f33056cf7f5a58c664ed85008bab3838d5 (patch)
treefd4aa089603034983a965411cc3a501c61557c9c
parent49210e8f6bec46b416113f7b93784d7fff655f19 (diff)
downloadmongo-908652f33056cf7f5a58c664ed85008bab3838d5.tar.gz
SERVER-35936 Allow PowerShell to connect using TLS 1.2
Set value instead of appending - append not supported in some environments. Closes #1249 Signed-off-by: Mathew Robinson <chasinglogic@gmail.com> (cherry picked from commit 9b9359528083d47271cfed7e5c5d5316887d8093)
-rwxr-xr-xsrc/mongo/installer/compass/Install-Compass.ps1.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/installer/compass/Install-Compass.ps1.in b/src/mongo/installer/compass/Install-Compass.ps1.in
index 11d79a30696..8d123e38d39 100755
--- a/src/mongo/installer/compass/Install-Compass.ps1.in
+++ b/src/mongo/installer/compass/Install-Compass.ps1.in
@@ -33,6 +33,11 @@ Remove-Item $CompassExe -ErrorAction:Ignore
try {
Write-Output "Downloading Compass from $CompassUrl"
+
+ # Default PowerShell SecurityProtocol does not support Tls1.2 (required by domain)
+ if ([Net.ServicePointManager]::SecurityProtocol.ToString() -NotMatch "Tls12") {
+ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
+ }
Invoke-WebRequest -Uri $CompassUrl -OutFile $CompassExe
Write-Output "Installing Compass"