summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2022-01-13 11:26:31 -0800
committerJohn McCrae <john.mccrae@progress.com>2022-01-18 13:34:13 -0800
commitaab487f9792065528a449c381f675f72ec854cdc (patch)
treea13615bf2c919e470347ca5b2d15aac058faacc5
parentb88d45dc94f030d23e614d45beb2a00220604712 (diff)
downloadchef-aab487f9792065528a449c381f675f72ec854cdc.tar.gz
Update Chef Client to retrieve client.pem from Windows CertStore
Signed-off-by: John McCrae <john.mccrae@progress.com>
-rw-r--r--lib/chef/http/authenticator.rb4
-rw-r--r--spec/unit/platform/query_helpers_spec.rb1
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/chef/http/authenticator.rb b/lib/chef/http/authenticator.rb
index 58c964ef6a..26413c283b 100644
--- a/lib/chef/http/authenticator.rb
+++ b/lib/chef/http/authenticator.rb
@@ -183,7 +183,7 @@ class Chef
password = SOME_CHARS.sample(1 + rand(SOME_CHARS.count)).join[0...14]
values = { name: "PfxPass", type: :string, data: password }
@win32registry.set_value(new_path, values)
- return password
+ password
end
def self.retrieve_certificate_key(client_name)
@@ -217,7 +217,7 @@ class Chef
end
end
- return false
+ false
end
def authentication_headers(method, url, json_body = nil, headers = nil)
diff --git a/spec/unit/platform/query_helpers_spec.rb b/spec/unit/platform/query_helpers_spec.rb
index 73c1d7dc04..424bd6348b 100644
--- a/spec/unit/platform/query_helpers_spec.rb
+++ b/spec/unit/platform/query_helpers_spec.rb
@@ -18,7 +18,6 @@
require "spec_helper"
-
describe "Chef::Platform#supports_dsc_invoke_resource?", :windows_only do
it "returns false if powershell is not present" do
node = Chef::Node.new