Skip to content

Commit

Permalink
Remove the test since it seems unspecified and fixed in later versions
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Nov 27, 2023
1 parent 19349d6 commit 5a203d0
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions library/openssl/kdf/pbkdf2_hmac_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,24 +154,6 @@
}.should raise_error(ArgumentError, 'missing keywords: :salt, :iterations, :length, :hash')
end


quarantine! do
guard -> { OpenSSL::OPENSSL_VERSION_NUMBER < 0x30000000 } do
it "treats 0 or less iterations as a single iteration" do
salt = "\x00".b * 16
length = 16
hash = "sha1"

# "Any iter less than 1 is treated as a single iteration."
key0 = OpenSSL::KDF.pbkdf2_hmac("secret", **@defaults, iterations: 0)
key_negative = OpenSSL::KDF.pbkdf2_hmac("secret", **@defaults, iterations: -1)
key1 = OpenSSL::KDF.pbkdf2_hmac("secret", **@defaults, iterations: 1)
key0.should == key1
key_negative.should == key1
end
end
end

guard -> { OpenSSL::OPENSSL_VERSION_NUMBER >= 0x30000000 } do
it "raises an OpenSSL::KDF::KDFError for 0 or less iterations" do
-> {
Expand Down

0 comments on commit 5a203d0

Please sign in to comment.