diff --git a/lib/serverspec/type/x509_private_key.rb b/lib/serverspec/type/x509_private_key.rb index 402049e3..1bb95686 100644 --- a/lib/serverspec/type/x509_private_key.rb +++ b/lib/serverspec/type/x509_private_key.rb @@ -12,9 +12,8 @@ def encrypted? end def has_matching_certificate?(cert_file) - mac_op = "openssl sha -sha512" - h1 = @runner.run_command("openssl x509 -noout -modulus -in #{cert_file} | #{mac_op}") - h2 = @runner.run_command("openssl rsa -noout -modulus -in #{name} | #{mac_op}") + h1 = @runner.run_command("openssl x509 -noout -modulus -in #{cert_file}") + h2 = @runner.run_command("openssl rsa -noout -modulus -in #{name}") (h1.stdout == h2.stdout) && (h1.exit_status == 0) && (h2.exit_status == 0) end end