Skip to content

Commit 8c5cd1d

Browse files
committed
test/openssl/test_pkey_*: skip tests for empty instances
These don't work and make no sense on OpenSSL 3.0, since PKey instances are immutable once initialized.
1 parent 5a437e0 commit 8c5cd1d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/openssl/test_pkey_dh.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def test_new_empty
1010
dh = OpenSSL::PKey::DH.new
1111
assert_equal nil, dh.p
1212
assert_equal nil, dh.priv_key
13-
end
13+
end if !openssl?(3, 0, 0)
1414

1515
def test_new_generate
1616
# This test is slow

test/openssl/test_pkey_rsa.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def test_verify_empty_rsa
172172
assert_raise(OpenSSL::PKey::PKeyError, "[Bug #12783]") {
173173
rsa.verify("SHA1", "a", "b")
174174
}
175-
end
175+
end if !openssl?(3, 0, 0)
176176

177177
def test_sign_verify_pss
178178
key = Fixtures.pkey("rsa1024")
@@ -395,7 +395,7 @@ def test_RSAPublicKey
395395
EOF
396396
key = OpenSSL::PKey::RSA.new(pem)
397397
assert_same_rsa rsa1024pub, key
398-
end
398+
end if !openssl?(3, 0, 0) # RSAPublicKey is not available on OpenSSL 3.0
399399

400400
def test_PUBKEY
401401
rsa1024 = Fixtures.pkey("rsa1024")

0 commit comments

Comments
 (0)