Skip to content

Commit

Permalink
[ruby/openssl] test/openssl/test_pkey.rb: allow failures in test_s_ge…
Browse files Browse the repository at this point in the history
…nerate_parameters

Commit ruby/openssl@f2e2a5e5ed8e ("test/openssl/test_pkey.rb: allow failures in
test_s_generate_parameters", 2022-12-23) was completely bogus. The
problem in OpenSSL 3.0.0-3.0.5 is that errors from the callback are
sometimes silently suppressed.

ruby/openssl@ccc1594492
  • Loading branch information
rhenium authored and hsbt committed Dec 26, 2022
1 parent cea6951 commit 24c9adc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/openssl/test_pkey.rb
Expand Up @@ -40,18 +40,18 @@ def test_s_generate_parameters
}

# Parameter generation callback is called
if openssl?(3, 0, 0, 0) && !openssl?(3, 0, 0, 6)
# Errors in BN_GENCB were not properly handled. This special pend is to
# suppress failures on Ubuntu 22.04, which uses OpenSSL 3.0.2.
pend "unstable test on OpenSSL 3.0.[0-5]"
end
cb_called = []
assert_raise(RuntimeError) {
OpenSSL::PKey.generate_parameters("DSA") { |*args|
cb_called << args
raise "exit!" if cb_called.size == 3
}
}
if !cb_called && openssl?(3, 0, 0) && !openssl?(3, 0, 6)
# Errors in BN_GENCB were not properly handled. This special pend is to
# suppress failures on Ubuntu 22.04, which uses OpenSSL 3.0.2.
pend "unstable test on OpenSSL 3.0.[0-5]"
end
assert_not_empty cb_called
end

Expand Down

0 comments on commit 24c9adc

Please sign in to comment.