ruby-changes:29777
From: emboss <ko1@a...>
Date: Mon, 8 Jul 2013 08:30:54 +0900 (JST)
Subject: [ruby-changes:29777] emboss:r41829 (trunk): * test/openssl/test_pkey_ec.rb: Skip tests for "Oakley" curves as
emboss 2013-07-08 08:30:42 +0900 (Mon, 08 Jul 2013) New Revision: 41829 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41829 Log: * test/openssl/test_pkey_ec.rb: Skip tests for "Oakley" curves as they are not suitable for ECDSA. [ruby-core:54881] [Bug #8384] Modified files: trunk/ChangeLog trunk/test/openssl/test_pkey_ec.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 41828) +++ ChangeLog (revision 41829) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Jul 8 08:26:15 2013 Martin Bosslet <Martin.Bosslet@g...> + + * 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@f...> * bignum.c (bary_mul): Add a RB_GC_GUARD. Index: test/openssl/test_pkey_ec.rb =================================================================== --- test/openssl/test_pkey_ec.rb (revision 41828) +++ test/openssl/test_pkey_ec.rb (revision 41829) @@ -11,6 +11,7 @@ class OpenSSL::TestEC < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/openssl/test_pkey_ec.rb#L11 @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::Test https://github.com/ruby/ruby/blob/trunk/test/openssl/test_pkey_ec.rb#L45 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::Test https://github.com/ruby/ruby/blob/trunk/test/openssl/test_pkey_ec.rb#L60 assert_equal(group.degree, gr.degree) end end + end + def test_key_encoding for key in @keys group = key.group -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/