diff options
-rw-r--r-- | lib/drb/ssl.rb | 2 | ||||
-rw-r--r-- | lib/webrick/ssl.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/openssl/hmac/digest_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/openssl/hmac/hexdigest_spec.rb | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/drb/ssl.rb b/lib/drb/ssl.rb index 3d528c6172..54ab1ef395 100644 --- a/lib/drb/ssl.rb +++ b/lib/drb/ssl.rb @@ -196,7 +196,7 @@ module DRb if comment = self[:SSLCertComment] cert.add_extension(ef.create_extension("nsComment", comment)) end - cert.sign(rsa, OpenSSL::Digest::SHA256.new) + cert.sign(rsa, "SHA256") @cert = cert @pkey = rsa diff --git a/lib/webrick/ssl.rb b/lib/webrick/ssl.rb index ab1837fda6..e448095a12 100644 --- a/lib/webrick/ssl.rb +++ b/lib/webrick/ssl.rb @@ -130,7 +130,7 @@ module WEBrick aki = ef.create_extension("authorityKeyIdentifier", "keyid:always,issuer:always") cert.add_extension(aki) - cert.sign(rsa, OpenSSL::Digest::SHA256.new) + cert.sign(rsa, "SHA256") return [ cert, rsa ] end 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, |