mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
openssl: fix test failure due to the previous commit
* test/openssl/test_pkey_ec.rb (test_ec_point_mul): My previous commit r55059 was broken. I should have been more careful. Sorry. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1d1efeeafa
commit
898aeb8779
1 changed files with 6 additions and 5 deletions
|
@ -210,7 +210,7 @@ class OpenSSL::TestEC < OpenSSL::TestCase
|
|||
assert_equal("040D0A", result_b1.to_bn.to_s(16))
|
||||
rescue OpenSSL::PKey::EC::Group::Error
|
||||
# CentOS patches OpenSSL to reject curves defined over Fp where p < 256 bits
|
||||
raise if e.message !~ /unsupported field/
|
||||
raise if $!.message !~ /unsupported field/
|
||||
end
|
||||
|
||||
p256_key = OpenSSL::TestUtils::TEST_KEY_EC_P256V1
|
||||
|
@ -218,10 +218,11 @@ class OpenSSL::TestEC < OpenSSL::TestCase
|
|||
assert_equal(p256_key.public_key, p256_g.generator.mul(p256_key.private_key))
|
||||
|
||||
# invalid argument
|
||||
assert_raise(TypeError) { point_a.mul(nil) }
|
||||
assert_raise(ArgumentError) { point_a.mul([1.to_bn], [point_a]) }
|
||||
assert_raise(TypeError) { point_a.mul([1.to_bn], nil) }
|
||||
assert_raise(TypeError) { point_a.mul([nil], []) }
|
||||
point = p256_key.public_key
|
||||
assert_raise(TypeError) { point.mul(nil) }
|
||||
assert_raise(ArgumentError) { point.mul([1.to_bn], [point]) }
|
||||
assert_raise(TypeError) { point.mul([1.to_bn], nil) }
|
||||
assert_raise(TypeError) { point.mul([nil], []) }
|
||||
end
|
||||
|
||||
# test Group: asn1_flag, point_conversion
|
||||
|
|
Loading…
Reference in a new issue