mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/openssl/test_pkey_ec.rb: Skip tests for "Oakley" curves as
they are not suitable for ECDSA. [ruby-core:54881] [Bug #8384] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a25f95f8b7
commit
ed92ae818f
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
Mon Jul 8 08:26:15 2013 Martin Bosslet <Martin.Bosslet@gmail.com>
|
||||
|
||||
* test/openssl/test_pkey_ec.rb: Skip tests for "Oakley" curves as
|
||||
they are not suitable for ECDSA.
|
||||
[ruby-core:54881] [Bug #8384]
|
||||
|
||||
Mon Jul 8 08:03:01 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (bary_mul): Add a RB_GC_GUARD.
|
||||
|
|
|
@ -11,6 +11,7 @@ class OpenSSL::TestEC < Test::Unit::TestCase
|
|||
@keys = []
|
||||
|
||||
OpenSSL::PKey::EC.builtin_curves.each do |curve, comment|
|
||||
next if curve.start_with?("Oakley") # Oakley curves are not suitable for ECDSA
|
||||
group = OpenSSL::PKey::EC::Group.new(curve)
|
||||
|
||||
key = OpenSSL::PKey::EC.new(group)
|
||||
|
@ -44,11 +45,12 @@ class OpenSSL::TestEC < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_encoding
|
||||
def test_group_encoding
|
||||
for group in @groups
|
||||
for meth in [:to_der, :to_pem]
|
||||
txt = group.send(meth)
|
||||
gr = OpenSSL::PKey::EC::Group.new(txt)
|
||||
|
||||
assert_equal(txt, gr.send(meth))
|
||||
|
||||
assert_equal(group.generator.to_bn, gr.generator.to_bn)
|
||||
|
@ -58,7 +60,9 @@ class OpenSSL::TestEC < Test::Unit::TestCase
|
|||
assert_equal(group.degree, gr.degree)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_key_encoding
|
||||
for key in @keys
|
||||
group = key.group
|
||||
|
||||
|
|
Loading…
Reference in a new issue