aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-18 10:07:38 +0000
committerrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-18 10:07:38 +0000
commit44993c7b3257236d5896355056e5dc61add43c1f (patch)
tree8c79d9a3e4e54397023760e5a8be8729d13dddd7
parentab12c190b02443cd3ca5f68ae129583772f6463a (diff)
downloadruby-44993c7b3257236d5896355056e5dc61add43c1f.tar.gz
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
-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 0a2351d9c9..673b0d6f43 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