- Status changed from Open to Assigned
- Assignee set to rhenium (Kazuki Yamaguchi)
I reproduced it, and can avoid it by applying this.
diff --git a/test/openssl/test_pkey_ec.rb b/test/openssl/test_pkey_ec.rb
index e05b70a..e15d875 100644
--- a/test/openssl/test_pkey_ec.rb
+++ b/test/openssl/test_pkey_ec.rb
@@ -14,12 +14,12 @@ def setup
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
The following code sometimes causes the crash (also with Ruby 2.3.0), I didn't dig any deeper but I suspect there is a bug in Ubuntu's patched OpenSSL.
require "openssl"
begin
OpenSSL::PKey::EC.new("Oakley-EC2N-4").generate_key
rescue
p $!
end
OpenSSL::PKey::RSA.new(512)
#<OpenSSL::PKey::ECError: EC_KEY_generate_key: pairwise test failed>
fips.c(139): OpenSSL internal error, assertion failed: FATAL FIPS SELFTEST FAILURE
Aborted