Skip to content

Commit dd2fdd5

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 7c61113 commit dd2fdd5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/openssl/test_pkey_dh.rb

+1-1
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def test_verify_empty_rsa
167167
assert_raise(OpenSSL::PKey::PKeyError, "[Bug #12783]") {
168168
rsa.verify("SHA1", "a", "b")
169169
}
170-
end
170+
end if !openssl?(3, 0, 0)
171171

172172
def test_sign_verify_pss
173173
key = Fixtures.pkey("rsa1024")
@@ -390,7 +390,7 @@ def test_RSAPublicKey
390390
EOF
391391
key = OpenSSL::PKey::RSA.new(pem)
392392
assert_same_rsa rsa1024pub, key
393-
end
393+
end if !openssl?(3, 0, 0) # RSAPublicKey is not available on OpenSSL 3.0
394394

395395
def test_PUBKEY
396396
rsa1024 = Fixtures.pkey("rsa1024")

0 commit comments

Comments
 (0)