diff options
author | Bart de Water <bartdewater@gmail.com> | 2020-06-28 17:18:34 -0400 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-29 13:25:32 +0900 |
commit | 3621a7debf746723281900851e009c2111fc1f56 (patch) | |
tree | 4205534188d938b83155df60c5f3f30e20fe0407 /spec | |
parent | 1ce9c37257111df15ca646c526b86798fab5775e (diff) | |
download | ruby-3621a7debf746723281900851e009c2111fc1f56.tar.gz |
Avoid deprecated OpenSSL::Digest constants
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/library/openssl/hmac/digest_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/openssl/hmac/hexdigest_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/library/openssl/hmac/digest_spec.rb b/spec/ruby/library/openssl/hmac/digest_spec.rb index 22bc7023bc..03ed136e64 100644 --- a/spec/ruby/library/openssl/hmac/digest_spec.rb +++ b/spec/ruby/library/openssl/hmac/digest_spec.rb @@ -4,7 +4,7 @@ require 'openssl' describe "OpenSSL::HMAC.digest" do it "returns an SHA1 digest" do - cur_digest = OpenSSL::Digest::SHA1.new + cur_digest = OpenSSL::Digest.new("SHA1") cur_digest.digest.should == HMACConstants::BlankSHA1Digest digest = OpenSSL::HMAC.digest(cur_digest, HMACConstants::Key, diff --git a/spec/ruby/library/openssl/hmac/hexdigest_spec.rb b/spec/ruby/library/openssl/hmac/hexdigest_spec.rb index 7f73b2db09..3508c1bbd7 100644 --- a/spec/ruby/library/openssl/hmac/hexdigest_spec.rb +++ b/spec/ruby/library/openssl/hmac/hexdigest_spec.rb @@ -4,7 +4,7 @@ require 'openssl' describe "OpenSSL::HMAC.hexdigest" do it "returns an SHA1 hex digest" do - cur_digest = OpenSSL::Digest::SHA1.new + cur_digest = OpenSSL::Digest.new("SHA1") cur_digest.hexdigest.should == HMACConstants::BlankSHA1HexDigest hexdigest = OpenSSL::HMAC.hexdigest(cur_digest, HMACConstants::Key, |