diff options
author | Nimesh-Msys <nimesh.patni@msystechnologies.com> | 2019-02-15 21:21:49 +0530 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2019-03-04 10:00:09 -0800 |
commit | 8989b00b3209a092fc07d3daae4683cf9fe682f2 (patch) | |
tree | 239a5f8b4137644417f9544e4284b75fa604ea3f /spec | |
parent | 4fd1eeb3ac1cd9fe57b318cee7425929a17f128a (diff) | |
download | chef-8989b00b3209a092fc07d3daae4683cf9fe682f2.tar.gz |
Fetching OpenSSL::X509::Certificate object without shell interactions.
- Previously, we were building a new OpenSSL::X509::Certificate object with PEM string contents.
- To get this content, we were using openssl utility and were converting all certificate types into PEM
- And were extracting the PEM contents out of resulting data.
- It could directly be done via correct usage of applicable classes.
- Reverted using Open3. It uses shell hence did not solved the purpose.
Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/functional/resource/windows_certificate_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/functional/resource/windows_certificate_spec.rb b/spec/functional/resource/windows_certificate_spec.rb index a9ed99d318..eac7ee31b2 100644 --- a/spec/functional/resource/windows_certificate_spec.rb +++ b/spec/functional/resource/windows_certificate_spec.rb @@ -228,7 +228,7 @@ describe Chef::Resource::WindowsCertificate, :windows_only, :appveyor_only do win_certificate.pfx_password = "Invalid password" end it "Raises an error" do - expect { win_certificate.run_action(:create) }.to raise_error(RuntimeError) + expect { win_certificate.run_action(:create) }.to raise_error(OpenSSL::PKCS12::PKCS12Error) end end end |