aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pkey_ec.rb
diff options
context:
space:
mode:
authorrhe <rhe@ruby-lang.org>2016-06-18 09:10:19 +0000
committerKazuki Yamaguchi <k@rhe.jp>2016-06-19 23:25:32 +0900
commitffa6307a2ac9ca63d7a14aa7eff9051ddee52c4f (patch)
tree214923d623cd5edfe6b04e3eef2715eba48f099f /test/test_pkey_ec.rb
parent9af69abcec15b114d9a0ec3811983fc1d7b5a1dc (diff)
downloadruby-openssl-ffa6307a2ac9ca63d7a14aa7eff9051ddee52c4f.tar.gz
openssl: avoid test crash on Ubuntu 16.04
* test/openssl/test_pkey_ec.rb (setup): Don't call EC#generate_key! for Oakley-* curves. This causes an odd error on Ubuntu 16.04 with openssl 1.0.2g-1ubuntu4.1. begin OpenSSL::PKey::EC.new("Oakley-EC2N-4").generate_key rescue p $! end OpenSSL::PKey::RSA.new(512) This sometimes causes: #<OpenSSL::PKey::ECError: EC_KEY_generate_key: pairwise test failed> fips.c(139): OpenSSL internal error, assertion failed: FATAL FIPS SELFTEST FAILURE [ruby-dev:49670] [Bug #12504] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_pkey_ec.rb')
-rw-r--r--test/test_pkey_ec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_pkey_ec.rb b/test/test_pkey_ec.rb
index e05b70ac..e15d8752 100644
--- a/test/test_pkey_ec.rb
+++ b/test/test_pkey_ec.rb
@@ -14,12 +14,12 @@ class OpenSSL::TestEC < OpenSSL::TestCase
OpenSSL::PKey::EC.builtin_curves.each do |curve, comment|
group = OpenSSL::PKey::EC::Group.new(curve)
- key = OpenSSL::PKey::EC.new(group)
- key.generate_key!
-
# Oakley curves and X25519 are not suitable for signing
next if ["Oakley", "X25519"].any? { |n| curve.start_with?(n) }
+ key = OpenSSL::PKey::EC.new(group)
+ key.generate_key!
+
@groups << group
@keys << key
end