зеркало из https://github.com/github/ruby.git
Avoid deprecated OpenSSL::Digest constants
This commit is contained in:
Родитель
1ce9c37257
Коммит
3621a7debf
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче