Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed piping results to shasum to avoid test passing incorrectly #552

Merged
merged 1 commit into from
Jan 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/serverspec/type/x509_private_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down