ruby/ruby-3.1.0-Disable-test_no_private_exp-on-OpenSSL-3.0.patch
Vít Ondruch 2da7a540e7 Update OpenSSL 3 compatibility patches.
This replaces the parts of the original PR with official patches which
landed in [ruby/openssl](https://github.com/ruby/openssl) repository and
should reflect the state of OpenSSL 3 support in Ruby 3.1.
2022-01-25 18:24:19 +01:00

28 lines
1.0 KiB
Diff

From 47975ece4096cdab16b3f200f93ea2377dfb41ac Mon Sep 17 00:00:00 2001
From: Kazuki Yamaguchi <k@rhe.jp>
Date: Mon, 31 May 2021 14:17:21 +0900
Subject: [PATCH] test/openssl/test_pkey_rsa: disable test_no_private_exp on
OpenSSL 3.0
OpenSSL::PKey::RSA#set_key does not exist when built with OpenSSL 3.0,
so it is not possible to create an RSA object with incomplete state.
https://github.com/ruby/openssl/commit/ca03c9c070
---
test/openssl/test_pkey_rsa.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/openssl/test_pkey_rsa.rb b/test/openssl/test_pkey_rsa.rb
index 4548bdb2cfa6..dbe87ba4c1b0 100644
--- a/test/openssl/test_pkey_rsa.rb
+++ b/test/openssl/test_pkey_rsa.rb
@@ -11,7 +11,7 @@ def test_no_private_exp
key.set_factors(rsa.p, rsa.q)
assert_raise(OpenSSL::PKey::RSAError){ key.private_encrypt("foo") }
assert_raise(OpenSSL::PKey::RSAError){ key.private_decrypt("foo") }
- end
+ end if !openssl?(3, 0, 0) # Impossible state in OpenSSL 3.0
def test_private
# Generated by key size and public exponent