summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-18 10:07:38 (GMT)
committerrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-18 10:07:38 (GMT)
commit898aeb87792e952ba831931c2212baa50d81b62e (patch)
tree8c79d9a3e4e54397023760e5a8be8729d13dddd7 /test
parent1d1efeeafa934c4d206ea80a8b02996477d74218 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/openssl/test_pkey_ec.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/openssl/test_pkey_ec.rb b/test/openssl/test_pkey_ec.rb
index 0a2351d..673b0d6 100644
--- a/test/openssl/test_pkey_ec.rb
+++ b/test/openssl/test_pkey_ec.rb
@@ -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