summaryrefslogtreecommitdiff
path: root/lib/chef/resource/windows_certificate.rb
diff options
context:
space:
mode:
authormwrock <matt@mattwrock.com>2020-10-28 15:44:50 -0700
committermwrock <matt@mattwrock.com>2020-10-28 19:25:43 -0700
commit67f3ba114e27e8353b7844aede1c26b06fdd7a3e (patch)
treeb4c6cd3f5f82e75108dff0c66c1a858c760011cf /lib/chef/resource/windows_certificate.rb
parentef9649e543b6218053fc98208ce884cc81882ce1 (diff)
downloadchef-67f3ba114e27e8353b7844aede1c26b06fdd7a3e.tar.gz
convert most internal powershell_out to powershell_exec
Signed-off-by: mwrock <matt@mattwrock.com>
Diffstat (limited to 'lib/chef/resource/windows_certificate.rb')
-rw-r--r--lib/chef/resource/windows_certificate.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/resource/windows_certificate.rb b/lib/chef/resource/windows_certificate.rb
index 68874af4d0..2c8c7c72ff 100644
--- a/lib/chef/resource/windows_certificate.rb
+++ b/lib/chef/resource/windows_certificate.rb
@@ -207,16 +207,16 @@ class Chef
when ".der"
out_file.puts(cert_obj.to_der)
when ".cer"
- cert_out = powershell_out("openssl x509 -text -inform DER -in #{cert_obj.to_pem} -outform CER").stdout
+ cert_out = shell_out("openssl x509 -text -inform DER -in #{cert_obj.to_pem} -outform CER").stdout
out_file.puts(cert_out)
when ".crt"
- cert_out = powershell_out("openssl x509 -text -inform DER -in #{cert_obj.to_pem} -outform CRT").stdout
+ cert_out = shell_out("openssl x509 -text -inform DER -in #{cert_obj.to_pem} -outform CRT").stdout
out_file.puts(cert_out)
when ".pfx"
- cert_out = powershell_out("openssl pkcs12 -export -nokeys -in #{cert_obj.to_pem} -outform PFX").stdout
+ cert_out = shell_out("openssl pkcs12 -export -nokeys -in #{cert_obj.to_pem} -outform PFX").stdout
out_file.puts(cert_out)
when ".p7b"
- cert_out = powershell_out("openssl pkcs7 -export -nokeys -in #{cert_obj.to_pem} -outform P7B").stdout
+ cert_out = shell_out("openssl pkcs7 -export -nokeys -in #{cert_obj.to_pem} -outform P7B").stdout
out_file.puts(cert_out)
else
Chef::Log.info("Supported certificate format .pem, .der, .cer, .crt, .pfx and .p7b")
@@ -327,7 +327,7 @@ class Chef
# @return [Boolean] Whether the certificate file is binary encoded or not
#
def binary_cert?
- powershell_out!("file -b --mime-encoding #{new_resource.source}").stdout.strip == "binary"
+ shell_out!("file -b --mime-encoding #{new_resource.source}").stdout.strip == "binary"
end
# Imports the certificate object into cert store