Avoid deprecated OpenSSL::Digest constants
This commit is contained in:
parent
1ce9c37257
commit
3621a7debf
Notes:
git
2020-06-29 13:25:55 +09:00
@ -196,7 +196,7 @@ module DRb
|
|||||||
if comment = self[:SSLCertComment]
|
if comment = self[:SSLCertComment]
|
||||||
cert.add_extension(ef.create_extension("nsComment", comment))
|
cert.add_extension(ef.create_extension("nsComment", comment))
|
||||||
end
|
end
|
||||||
cert.sign(rsa, OpenSSL::Digest::SHA256.new)
|
cert.sign(rsa, "SHA256")
|
||||||
|
|
||||||
@cert = cert
|
@cert = cert
|
||||||
@pkey = rsa
|
@pkey = rsa
|
||||||
|
@ -130,7 +130,7 @@ module WEBrick
|
|||||||
aki = ef.create_extension("authorityKeyIdentifier",
|
aki = ef.create_extension("authorityKeyIdentifier",
|
||||||
"keyid:always,issuer:always")
|
"keyid:always,issuer:always")
|
||||||
cert.add_extension(aki)
|
cert.add_extension(aki)
|
||||||
cert.sign(rsa, OpenSSL::Digest::SHA256.new)
|
cert.sign(rsa, "SHA256")
|
||||||
|
|
||||||
return [ cert, rsa ]
|
return [ cert, rsa ]
|
||||||
end
|
end
|
||||||
|
@ -4,7 +4,7 @@ require 'openssl'
|
|||||||
|
|
||||||
describe "OpenSSL::HMAC.digest" do
|
describe "OpenSSL::HMAC.digest" do
|
||||||
it "returns an SHA1 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
|
cur_digest.digest.should == HMACConstants::BlankSHA1Digest
|
||||||
digest = OpenSSL::HMAC.digest(cur_digest,
|
digest = OpenSSL::HMAC.digest(cur_digest,
|
||||||
HMACConstants::Key,
|
HMACConstants::Key,
|
||||||
|
@ -4,7 +4,7 @@ require 'openssl'
|
|||||||
|
|
||||||
describe "OpenSSL::HMAC.hexdigest" do
|
describe "OpenSSL::HMAC.hexdigest" do
|
||||||
it "returns an SHA1 hex digest" 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
|
cur_digest.hexdigest.should == HMACConstants::BlankSHA1HexDigest
|
||||||
hexdigest = OpenSSL::HMAC.hexdigest(cur_digest,
|
hexdigest = OpenSSL::HMAC.hexdigest(cur_digest,
|
||||||
HMACConstants::Key,
|
HMACConstants::Key,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user