aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pkey_ec.rb
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-02-03 00:01:45 +0900
committerKazuki Yamaguchi <k@rhe.jp>2017-02-03 00:01:45 +0900
commit6693a549d6738e5957201094004abd2159164332 (patch)
tree5a3bca4cd8582944f36e99609690643a5c400135 /test/test_pkey_ec.rb
parent74f166f410bd75d625a69ecc2b53601718294930 (diff)
downloadruby-openssl-6693a549d6738e5957201094004abd2159164332.tar.gz
test/test_pkey_ec: do not use dummy 0 order
Ubuntu trusty's OpenSSL package 1.0.1f-1ubuntu2.22 has backported an OpenSSL commit f54be179aa4c that makes EC_GROUP_set_generator() call BN_MONT_CTX_set() which can segfault if an invalid value (== 0) is given. Avoid it.
Diffstat (limited to 'test/test_pkey_ec.rb')
-rw-r--r--test/test_pkey_ec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_pkey_ec.rb b/test/test_pkey_ec.rb
index e281f80c..c549d9c6 100644
--- a/test/test_pkey_ec.rb
+++ b/test/test_pkey_ec.rb
@@ -282,7 +282,7 @@ class OpenSSL::TestEC < OpenSSL::PKeyTestCase
group = OpenSSL::PKey::EC::Group.new(:GFp, 17, 2, 2)
group.point_conversion_form = :uncompressed
gen = OpenSSL::PKey::EC::Point.new(group, OpenSSL::BN.new("040501", 16))
- group.set_generator(gen, 0, 0)
+ group.set_generator(gen, 19, 1)
# 3 * (6, 3) = (16, 13)
point_a = OpenSSL::PKey::EC::Point.new(group, OpenSSL::BN.new("040603", 16))