Skip to content

Commit 6240557

Browse files
committed
port ruby/ruby@44d67128a8 for OpenSSL::TestCipher#test_aes_ccm failure
ruby/ruby@44d6712
1 parent 9a55b9c commit 6240557

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

debian/patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ Make-gemspecs-reproducible.patch
55
exclude-several-tests-unstable-in-Docker.patch
66
Fix-FTBFS-on-x32-misdetected-as-i386-or-amd64.patch
77
TestProcess-disable-gems-to-disable-rubygems_integration.patch
8+
test-openssl-test_cipher-skip-AES-CCM-tests-on-OpenSSL-1..patch
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From: Kazuki Yamaguchi <[email protected]>
2+
Date: Tue, 16 Mar 2021 22:05:04 +0900
3+
Subject: test/openssl/test_cipher: skip AES-CCM tests on OpenSSL <= 1.1.1b
4+
5+
AES CCM mode in OpenSSL <= 1.1.1b was overly strict in the parameters
6+
assignment order. This has been relaxed by OpenSSL 1.1.1c.
7+
8+
https://github.com/openssl/openssl/commit/b48e3be947ddc5da6b5a86db8341081c72b9a4ee
9+
10+
The test case is failing on Ubuntu 18.04 because it still uses the
11+
initial 1.1.1 release and has the issue:
12+
13+
http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20210316T120003Z.fail.html.gz
14+
---
15+
test/openssl/test_cipher.rb | 2 +-
16+
1 file changed, 1 insertion(+), 1 deletion(-)
17+
18+
diff --git a/test/openssl/test_cipher.rb b/test/openssl/test_cipher.rb
19+
index 65b36dd..3652f9c 100644
20+
--- a/test/openssl/test_cipher.rb
21+
+++ b/test/openssl/test_cipher.rb
22+
@@ -214,7 +214,7 @@ class OpenSSL::TestCipher < OpenSSL::TestCase
23+
assert_raise(OpenSSL::Cipher::CipherError) { cipher.update(ct2) }
24+
end if has_cipher?("aes-128-ccm") &&
25+
OpenSSL::Cipher.new("aes-128-ccm").authenticated? &&
26+
- OpenSSL::OPENSSL_VERSION_NUMBER >= 0x10101000 # version >= v1.1.1
27+
+ OpenSSL::OPENSSL_VERSION_NUMBER >= 0x1010103f # version >= 1.1.1c
28+
29+
def test_aes_gcm
30+
# GCM spec Appendix B Test Case 4

0 commit comments

Comments
 (0)