Skip to content

Commit e1a6e9c

Browse files
committed
digest: always run SHA-3 and truncated SHA-2 tests
The "pend" are no longer necessary, as they work with all OpenSSL variants we currently support. They were added in OpenSSL 1.1.1 and LibreSSL 3.8.0. They are also supported by the current AWS-LC release. This makes the SHA-3 tests run with AWS-LC correctly. AWS-LC does not report SHA-3 in OpenSSL::Digest.digests.
1 parent d725783 commit e1a6e9c

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

test/openssl/test_digest.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ def test_sha2
8888
end
8989

9090
def test_sha512_truncate
91-
pend "SHA512_224 is not implemented" unless digest_available?('sha512-224')
9291
sha512_224_a = "d5cdb9ccc769a5121d4175f2bfdd13d6310e0d3d361ea75d82108327"
9392
sha512_256_a = "455e518824bc0601f9fb858ff5c37d417d67c2f8e0df2babe4808858aea830f8"
9493

@@ -100,7 +99,6 @@ def test_sha512_truncate
10099
end
101100

102101
def test_sha3
103-
pend "SHA3 is not implemented" unless digest_available?('sha3-224')
104102
s224 = '6b4e03423667dbb73b6e15454f0eb1abd4597f9a1b078e3f5b5a6bc7'
105103
s256 = 'a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a'
106104
s384 = '0c63a75b845e4f7d01107d852e4c2485c51a50aaaa94fc61995e71bbee983a2ac3713831264adb47fb6bd1e058d5f004'
@@ -145,11 +143,6 @@ def check_digest(oid)
145143
d = OpenSSL::Digest.new(oid.oid)
146144
assert_not_nil(d)
147145
end
148-
149-
def digest_available?(name)
150-
@digests ||= OpenSSL::Digest.digests
151-
@digests.include?(name)
152-
end
153146
end
154147

155148
end

0 commit comments

Comments
 (0)