Skip to content

Commit

Permalink
Resolve upcoming openssl deprecation
Browse files Browse the repository at this point in the history
This is going to fail in Ruby 3.

Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 committed May 22, 2020
1 parent f426d59 commit 862d3c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/supermarket/app/models/user.rb
Expand Up @@ -226,7 +226,7 @@ def public_key_signature
# with private key: openssl rsa -in private_key.pem -pubout -outform DER | openssl md5 -c
# with public key: openssl rsa -in public_key.pub -pubin -outform DER | openssl md5 -c
key_in_der_format = OpenSSL::PKey::RSA.new(public_key).to_der
OpenSSL::Digest::MD5.hexdigest(key_in_der_format).scan(/../).join(':')
OpenSSL::Digest.hexdigest('MD5', key_in_der_format).scan(/../).join(':')
end

private
Expand Down

0 comments on commit 862d3c3

Please sign in to comment.