Skip to content

Commit

Permalink
test/openssl/test_digest: do not test constants for legacy algorithms
Browse files Browse the repository at this point in the history
Remove availability test for MD4 and RIPEMD160 as they are considered
legacy and may be missing depending on the compile-time options of
OpenSSL. OpenSSL 3.0 by default disables them.
  • Loading branch information
rhenium committed Oct 22, 2021
1 parent 2cd01d4 commit a3e59f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/openssl/test_digest.rb
Expand Up @@ -54,7 +54,7 @@ def test_reset
end

def test_digest_constants
%w{MD4 MD5 RIPEMD160 SHA1 SHA224 SHA256 SHA384 SHA512}.each do |name|
%w{MD5 SHA1 SHA224 SHA256 SHA384 SHA512}.each do |name|
assert_not_nil(OpenSSL::Digest.new(name))
klass = OpenSSL::Digest.const_get(name.tr('-', '_'))
assert_not_nil(klass.new)
Expand Down

0 comments on commit a3e59f4

Please sign in to comment.