summaryrefslogtreecommitdiff
path: root/spec/ruby/library/openssl
diff options
context:
space:
mode:
authorBart de Water <bartdewater@gmail.com>2020-06-28 17:18:34 -0400
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-29 13:25:32 +0900
commit3621a7debf746723281900851e009c2111fc1f56 (patch)
tree4205534188d938b83155df60c5f3f30e20fe0407 /spec/ruby/library/openssl
parent1ce9c37257111df15ca646c526b86798fab5775e (diff)
Avoid deprecated OpenSSL::Digest constants
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3270
Diffstat (limited to 'spec/ruby/library/openssl')
-rw-r--r--spec/ruby/library/openssl/hmac/digest_spec.rb2
-rw-r--r--spec/ruby/library/openssl/hmac/hexdigest_spec.rb2
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,