diff options
author | Nimesh-Msys <nimesh.patni@msystechnologies.com> | 2019-02-15 21:21:49 +0530 |
---|---|---|
committer | Nimesh-Msys <nimesh.patni@msystechnologies.com> | 2019-02-17 03:19:37 +0530 |
commit | ccd9b7c5ca3487880b4bd2aee8581e6fda53d192 (patch) | |
tree | 29662b458397c599081018e907988c57aed68238 /spec/functional | |
parent | 3031e99e96e9f9e046599d6e60e44cf5b1b1e2e1 (diff) | |
download | chef-ccd9b7c5ca3487880b4bd2aee8581e6fda53d192.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/functional')
-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 |