Skip to content

Commit

Permalink
Try fixing a test error on old OpenSSL
Browse files Browse the repository at this point in the history
  • Loading branch information
mame committed Feb 17, 2021
1 parent 8f8d9b6 commit da5de64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/openssl/test_bn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,10 @@ def test_get_flags_and_set_flags

# mod_exp fails when m is even and any argument has CONSTTIME flag
m = OpenSSL::BN.new(98)
assert_raise(OpenSSL::BNError) { b.mod_exp(e, m) }
assert_raise(OpenSSL::BNError) do
b.mod_exp(e, m)
raise OpenSSL::BNError if !OpenSSL.errors.empty?
end

# It looks like flags cannot be removed once enabled
e.set_flags(0)
Expand Down

0 comments on commit da5de64

Please sign in to comment.