diff options
author | John McCrae <jmccrae@chef.io> | 2021-04-12 13:24:01 -0700 |
---|---|---|
committer | John McCrae <jmccrae@chef.io> | 2021-04-20 11:54:17 -0700 |
commit | 5b260f2c420b1e5d50642117ffa57665b53b0f98 (patch) | |
tree | de54a726c2d31c195de6c13183bf20bc7cda9379 | |
parent | 99ce9d7e197db8f011f07148e91cefd066ac8133 (diff) | |
download | chef-5b260f2c420b1e5d50642117ffa57665b53b0f98.tar.gz |
uploading this for others to review
Signed-off-by: John McCrae <jmccrae@chef.io>
-rw-r--r-- | Gemfile.lock | 25 | ||||
-rw-r--r-- | lib/chef/resource/windows_certificate.rb | 3 | ||||
-rw-r--r-- | spec/functional/resource/windows_certificate_spec.rb | 2 |
3 files changed, 26 insertions, 4 deletions
diff --git a/Gemfile.lock b/Gemfile.lock index bb633556ad..b20679b7bf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,10 +1,18 @@ GIT remote: https://github.com/chef/chefstyle.git +<<<<<<< HEAD revision: def330761a328caecf463b684c0648dfca582f72 branch: master specs: chefstyle (1.7.5) rubocop (= 1.12.1) +======= + revision: 6d136684438e8809e703feb84c46c69e90e042a7 + branch: master + specs: + chefstyle (1.7.4) + rubocop (= 1.12.0) +>>>>>>> ee0114abeb... uploading this for others to review GIT remote: https://github.com/chef/ohai.git @@ -207,7 +215,11 @@ GEM highline (2.0.3) httpclient (2.8.3) iniparse (1.5.0) +<<<<<<< HEAD inspec-core (4.32.0) +======= + inspec-core (4.29.3) +>>>>>>> ee0114abeb... uploading this for others to review addressable (~> 2.4) chef-telemetry (~> 1.0) faraday (>= 0.9.0, < 1.4) @@ -230,8 +242,13 @@ GEM train-core (~> 3.0) tty-prompt (~> 0.17) tty-table (~> 0.10) +<<<<<<< HEAD inspec-core-bin (4.32.0) inspec-core (= 4.32.0) +======= + inspec-core-bin (4.29.3) + inspec-core (= 4.29.3) +>>>>>>> ee0114abeb... uploading this for others to review ipaddress (0.8.3) iso8601 (0.13.0) json (2.5.1) @@ -312,7 +329,11 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) rspec-support (3.10.2) +<<<<<<< HEAD rubocop (1.12.1) +======= + rubocop (1.12.0) +>>>>>>> ee0114abeb... uploading this for others to review parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) @@ -340,7 +361,11 @@ GEM syslog-logger (1.6.8) thor (1.1.0) tomlrb (1.3.0) +<<<<<<< HEAD train-core (3.6.2) +======= + train-core (3.5.5) +>>>>>>> ee0114abeb... uploading this for others to review addressable (~> 2.5) ffi (!= 1.13.0) json (>= 1.8, < 3.0) diff --git a/lib/chef/resource/windows_certificate.rb b/lib/chef/resource/windows_certificate.rb index 27880f44ca..7f7a345b86 100644 --- a/lib/chef/resource/windows_certificate.rb +++ b/lib/chef/resource/windows_certificate.rb @@ -303,12 +303,9 @@ class Chef end def pfx_ps_cmd(thumbprint, store_location: "LocalMachine", store_name: "My", output_path:, password: ) - # require "pry" - # binding.pry <<-CMD $mypwd = ConvertTo-SecureString -String "#{password}" -Force -AsPlainText $cert = Get-ChildItem -path cert:\\#{store_location}\\#{store_name} -Recurse | Where { $_.Thumbprint -eq "#{thumbprint.upcase}" } - # | Export-PfxCertificate -FilePath #{output_path} -Password $mypwd Export-PfxCertificate -Cert $cert -FilePath "#{output_path}" -Password $mypwd CMD end diff --git a/spec/functional/resource/windows_certificate_spec.rb b/spec/functional/resource/windows_certificate_spec.rb index aaa31f0bdd..07a52ed3b0 100644 --- a/spec/functional/resource/windows_certificate_spec.rb +++ b/spec/functional/resource/windows_certificate_spec.rb @@ -234,7 +234,7 @@ describe Chef::Resource::WindowsCertificate, :windows_only do resource.run_action(:create) end - it "succeeds with the main certificate's thumbprint" do + it "succeeds with the main certificate's thumbprint", :focus do expect(Chef::Log).to receive(:info).with("Certificate is valid") resource.source = p7b_thumbprint |