summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-10-29 15:52:27 -0700
committerGitHub <noreply@github.com>2020-10-29 15:52:27 -0700
commit0ac843a8ead7a7502dbdc1fc86d170d5cabd9bdd (patch)
treef578d967f67cef47315a96e0d9814a814ef74e8a
parentc31676bec86e89a6908ac0a40459a8442664f326 (diff)
parent9ee7a1fc9ae06887bdd4dbf1ecdcb776196a4e72 (diff)
downloadchef-0ac843a8ead7a7502dbdc1fc86d170d5cabd9bdd.tar.gz
Merge pull request #10574 from TimothyTitan/patch-1
Fix download errors during knife bootstrap on windows due to lack of TLS 1.2 support
-rw-r--r--lib/chef/knife/core/windows_bootstrap_context.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/knife/core/windows_bootstrap_context.rb b/lib/chef/knife/core/windows_bootstrap_context.rb
index 395bc025e0..4b40d5bfb9 100644
--- a/lib/chef/knife/core/windows_bootstrap_context.rb
+++ b/lib/chef/knife/core/windows_bootstrap_context.rb
@@ -256,6 +256,8 @@ class Chef
[String] $localPath
)
+ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
+
$ProxyUrl = $env:http_proxy;
$webClient = new-object System.Net.WebClient;