spec/message_digest_spec.rb in r509-1.0 vs spec/message_digest_spec.rb in r509-1.0.1
- old
+ new
@@ -51,20 +51,10 @@
it "translates MD5 name -> digest" do
md = R509::MessageDigest.new("MD5")
expect(md.name).to eq("md5")
expect(md.digest.is_a?(OpenSSL::Digest::MD5)).to eq(true)
end
- it "translates dss1 name -> digest" do
- md = R509::MessageDigest.new("dss1")
- expect(md.name).to eq("dss1")
- expect(md.digest.is_a?(OpenSSL::Digest::DSS1)).to eq(true)
- end
- it "translates DSS1 name -> digest" do
- md = R509::MessageDigest.new("DSS1")
- expect(md.name).to eq("dss1")
- expect(md.digest.is_a?(OpenSSL::Digest::DSS1)).to eq(true)
- end
it "translates unknown name -> digest" do
md = R509::MessageDigest.new("unknown")
expect(md.name).to eq("sha256")
expect(md.digest.is_a?(OpenSSL::Digest::SHA256)).to eq(true)
end
@@ -95,14 +85,9 @@
end
it "translates md5 digest -> name" do
md = R509::MessageDigest.new(OpenSSL::Digest::MD5.new)
expect(md.name).to eq("md5")
expect(md.digest.is_a?(OpenSSL::Digest::MD5)).to eq(true)
- end
- it "translates dss1 digest -> name" do
- md = R509::MessageDigest.new(OpenSSL::Digest::DSS1.new)
- expect(md.name).to eq("dss1")
- expect(md.digest.is_a?(OpenSSL::Digest::DSS1)).to eq(true)
end
it "creates a default digest with no params or nil" do
md = R509::MessageDigest.new
expect(md.name).to eq(R509::MessageDigest::DEFAULT_MD.downcase)
md = R509::MessageDigest.new(nil)