[Bug #2604] test_dsa_sign_verify() in test/openssl/test_ec.rb failes

Bug #2604: test_dsa_sign_verify() in test/openssl/test_ec.rb failes
http://redmine.ruby-lang.org/issues/show/2604

e$B5/I<<Te(B: Takahiro K.
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Low
e$B%+%F%4%je(B: ext
ruby -v: ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-netbsdelf]

NetBSD current (5.99.23)e$B$Ge(B make test-all
e$B$r<B9T$9$k$H!"e(Btest/openssl/test_ec.rbe$B$Ne(B
test_dsa_sign_verify()e$B$K<:GT$7$^$9!#e(B

test_dsa_sign_verify(OpenSSL::TestEC)
[./test/openssl/test_ec.rb:92:in test_dsa_sign_verify' ./test/openssl/test_ec.rb:88:ineach’
./test/openssl/test_ec.rb:88:in `test_dsa_sign_verify’]:
OpenSSL::PKey::ECError exception expected but none was thrown.

e$B$3$l$Oe(B test_dsa_sign_verify()e$B$N0J2<$N9T$G<:GT$7$F$$$^$9!#e(B

  assert_raises(OpenSSL::PKey::ECError) { key.dsa_sign_asn1(@data2) 

}

e$B$3$N%F%9%H$Oe(B
dsa_sign_asn1e$B$KD9$9$.$kCM$rEO$7$F%(%i!<$H$J$k$3$H$r4|BT$7$Fe(B
e$B$$$^$9!#e(BOpenSSLe$B$N%=!<%9$r3NG’$9$k$He(BNetBSD 5.0_STABLEe$B$Ne(B
0.9.9-dev e$B$"$?$je(B
e$B$^$G$O!"e(Bopenssl/crypto/ecdsa/ecs_ossl.ce$B$Ne(Becdsa_do_sign()e$BFb$G!"e(B

if (8 * dgst_len > BN_num_bits(order))
{
/* XXX
*
* Should provide for optional hash truncation:
* Keep the BN_num_bits(order) leftmost bits of dgst
* (see March 2006 FIPS 186-3 draft, which has a few
* confusing errors in this part though)
*/

ECDSAerr(ECDSA_F_ECDSA_DO_SIGN,
  ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
goto err;

}

e$B$H%A%’%C%/$5$l$F$$$^$9$,!“e(BNetBSD currente$B$Ne(BOpenSSL 1.1.0-dev
e$B$G$O!”$3$Ne(B
ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZEe$B$H$$$&%(%i!<$r5/$3$9%3!<%I$O:o=|$5$l!"e(B
e$BBe$o$j$KEO$5$l$?e([email protected]$j5M$a$k=hM}$,2C$($i$l$F$$$^$9!#e(B

e$B=>$C$F!"$3$N%(%i!<$H$J$k$3$H$r8!::$9$k%F%9%H$OGQ;_$9$k$+!“e(BOpenSSLe$B$N%P!<e(B
e$B%8%g%s$K1~$8$F9T$&I,MW$,$”$k$H;W$$$^$9!#e(B

2010/1/14 Takahiro K. [email protected]main.invalid:

            * (see March 2006 FIPS 186-3 draft, which has a few

e$BBe$o$j$KEO$5$l$?e([email protected]$j5M$a$k=hM}$,2C$($i$l$F$$$^$9!#e(B

e$B=>$C$F!"$3$N%(%i!<$H$J$k$3$H$r8!::$9$k%F%9%H$OGQ;_$9$k$+!“e(BOpenSSLe$B$N%P!<e(B
e$B%8%g%s$K1~$8$F9T$&I,MW$,$”$k$H;W$$$^$9!#e(B

FIPS
186-3e$B$Oe(B2009e$BG/e(B6e$B7n$Ke(Bfinale$B$,=P$F!“e(Bleftmoste$B<h$j=P$7e(B(SHALL)e$B$b4^$^$l$F$$$k$N$G!“e(Bopenssle$B$N$3$N5sF0JQ99$OLdBj$J$/!”$^[email protected]$H;W$$$^$9!#$H$$$&$o$1$G!“e(BKambee$B$5$s$NJ,@O$,@53N$G$”$j!”%F%9%HB&$NBP1~$,I,MW$G$9!#e(B0.9.8e$B7ONs$O$I$&[email protected]$m$&$J$"!#e(B

e$B$G!"<B:]$NBP1~$G$9$,!“e(Bcruby-openssle$B$Ne(Blead
maintainere$B$,0\9T$N:GCf$J$s$G$9$h$M$(!#e(B1.0.0e$BBP1~$H6&$K!”$^$H$a$F$d$C$?$[$&$,$h$$$H;W$$$^$9!Je(B[1.8,
1.9]e$B!_e(B[0.9.8, 1.0.0]e$B$J$N$G!"H>C<$K$d$k$H:.Mp$7$^$9!K!#e(B

evanphxe$B$be(BOpenSSLe$B$N;v>[email protected]$m$&$7!"[email protected]$m$&$J$"!#C/$+$d$k5$$N$"$k<c<T$O$$$^$;$s$+$M!#e(B

In message [email protected]
on Sun, 17 Jan 2010 12:11:24 +0900,
“NAKAMURA, Hiroshi” [email protected] wrote:

2010/1/14 Takahiro K. [email protected]:

e$B$3$N%F%9%H$Oe(B dsa_sign_asn1e$B$KD9$9$.$kCM$rEO$7$F%(%i!<$H$J$k$3$H$r4|BT$7$Fe(B
e$B$$$^$9!#e(BOpenSSLe$B$N%=!<%9$r3NG’$9$k$He(BNetBSD 5.0_STABLEe$B$Ne(B 0.9.9-dev e$B$"$?$je(B
e$B$^$G$O!"e(Bopenssl/crypto/ecdsa/ecs_ossl.ce$B$Ne(Becdsa_do_sign()e$BFb$G!“e(B
(snip)
FIPS 186-3e$B$Oe(B2009e$BG/e(B6e$B7n$Ke(Bfinale$B$,=P$F!“e(Bleftmoste$B<h$j=P$7e(B(SHALL)e$B$b4^$^$l$Fe(B
e$B$$$k$N$G!“e(Bopenssle$B$N$3$N5sF0JQ99$OLdBj$J$/!”$^[email protected]$H;W$$$^$9!#$H$$e(B
e$B$&$o$1$G!“e(BKambee$B$5$s$NJ,@O$,@53N$G$”$j!”%F%9%HB&$NBP1~$,I,MW$G$9!#e(B
0.9.8e$B7ONs$O$I$&[email protected]$m$&$J$”!#e(B
OpenSSLe$B$Ne(BCVSe$B%j%]%8%H%j$r3NG’$9$k$H!"e(B

http://cvs.openssl.org/rlog?f=openssl/crypto/ecdsa/ecs_ossl.c

2009e$BG/e(B12e$B7ne(B1e$BF|IU$1$G!"e(BOpenSSL_0_9_8-stablee$B$de(BOpenSSL_1_0_0-stablee$B$H$$$Ce(B
e$B$?%V%i%s%[email protected]$,;$5$5$l$F$$$^$9!#=>$C$F!"2?$+$N;v>p$G$3$l$i$Ne(B
e$B%V%i%s%A$+$i%j%j!<%9$5$l$k$H!"[email protected]$,9b$$$He(B
e$B;W$$$^$9!#e(B

2010/1/19 Takahiro K. [email protected]:

0.9.8e$B7ONs$O$I$&[email protected]$m$&$J$"!#e(B

OpenSSLe$B$Ne(BCVSe$B%j%]%8%H%j$r3NG’$9$k$H!"e(B

http://cvs.openssl.org/rlog?f=openssl/crypto/ecdsa/ecs_ossl.c

2009e$BG/e(B12e$B7ne(B1e$BF|IU$1$G!"e(BOpenSSL_0_9_8-stablee$B$de(BOpenSSL_1_0_0-stablee$B$H$$$Ce(B
e$B$?%V%i%s%[email protected]$,;$5$5$l$F$$$^$9!#=>$C$F!"2?$+$N;v>p$G$3$l$i$Ne(B
e$B%V%i%s%A$+$i%j%j!<%9$5$l$k$H!"[email protected]$,9b$$$He(B
e$B;W$$$^$9!#e(B

e$BCY$/$J$j$^$7$?$,!"@hF|%j%j!<%9$5$l$?e(B0.9.8me$B$KH?1G$5$l$F$$$F!"e(Bruby_1_8e$B$G3:Ev%F%9%H$,<:GT$9$k!Je(B95T1194A1F0Ee$B!K$N$r3NG’$7$^$7$?!#e(Bruby_1_8e$B$O;d$,[email protected]$7$^$9!#e(B

e$B%A%1%C%He(B #2604 e$B$,99?7$5$l$^$7$?!#e(B (by Takashi T.)

e$B$3$N7o!"e(B1.9 e$B$Ne(B trunk e$B$G$b%F%9%H$,<:GT$7$^$9!#e(B
e$B;29M$^$G$K!#e(B

  1. Failure:
    test_dsa_sign_verify(OpenSSL::TestEC)
    [/Users/tamura/ruby/src/ruby19/test/openssl/test_ec.rb:92]:
    OpenSSL::PKey::ECError expected but nothing was raised.

$ ./ruby -v
ruby 1.9.2dev (2010-03-26 trunk 27066) [x86_64-darwin10.2.0]

$ openssl version
OpenSSL 0.9.8n 24 Mar 2010

http://redmine.ruby-lang.org/issues/show/2604

2010/3/28 Takashi T. [email protected]:

e$B$3$N7o!"e(B1.9 e$B$Ne(B trunk e$B$G$b%F%9%H$,<:GT$7$^$9!#e(B
e$B;29M$^$G$K!#e(B

e$B$?$V$s$3$l$,Ev$?$k$H;W$$$^$9!#e(Bruby_1_8e$B$+$i$Ne(Bbackporte$B$G$9!#e(B
http://github.com/nahi/ruby/commit/274b9e41a4dd387c32ea4aebd7ba623f1753fb05
e$B;[email protected]$1$^$9!)e(B

2010/3/4 NAKAMURA, Hiroshi [email protected]:

ruby_1_8e$B$O;d$,[email protected]$7$^$9!#e(B

ruby_1_8e$B$Oe([email protected]$7$^$7$?!#e(B
http://redmine.ruby-lang.org/repositories/revision/ruby-18?rev=26837

e$B%A%1%C%He(B #2604 e$B$,99?7$5$l$^$7$?!#e(B (by Takashi T.)

e$B%@%a$G$7$?!#%(%i!<$O$=$N$^$^$G$9!#8@$C$F$J$+$C$?$N$G$9$,!"%(%i!<$,=P$k$N$Oe(B
MacPorts e$B$G$$$l$?e(B OpenSSL 0.9.8n e$B$G$9!#e(BApple e$BDs6!$Ne(B
OpenSSL 0.9.8l e$B$G$O%(%i!<$,=P$^$;$s!#e(B

$ ./miniruby -I…/ruby19/lib -I.ext/common -I./-
-r…/ruby19/ext/purelib.rb …/ruby19/tool/runruby.rb --extout=.ext –
“…/ruby19/test/runner.rb” …/ruby19/test/openssl
Loaded suite …/ruby19/test/runner
Started
…F…
Finished in 4.755997 seconds.

  1. Failure:
    test_dsa_sign_verify(OpenSSL::TestEC)
    [/Users/tamura/ruby/src/ruby19/test/openssl/test_ec.rb:92]:
    OpenSSL::PKey::ECError expected but nothing was raised.

86 tests, 1206 assertions, 1 failures, 0 errors, 0 skips

Test run options: --seed 21338

$ ./ruby -v
ruby 1.9.2dev (2010-03-31 trunk 27125) [x86_64-darwin10.3.0]

e$B4X78$J$$$G$9$,!"e(Bgithub e$B$Ne(BURLe$B$Ke(B

http://github.com/nahi/ruby/commit/274b9e41a4dd387c32ea4aebd7ba623f1753fb05.diff

e$B$H8e$m$Ke(Bdiffe$B$r$D$1$k$H$A$c$s$H%Q%C%[email protected]@.$7$F$/$l$k$s$G$9$M!#e(B

http://redmine.ruby-lang.org/issues/show/2604

2010/3/31 Takashi T. [email protected]:

e$B%@%a$G$7$?!#%(%i!<$O$=$N$^$^$G$9!#e(B

e$B$9$$$^$;$s!"e(Bpatche$B$r4V0c$($^$7$?!#$3$l$Oe(B1.0.0e$BBP1~!J$r=$I|$9$k!Ke(Bpatche$B$G$7$?!#e(B

e$B0J2<$r$3$N=g$KEv$F$F$/[email protected]$5$$!#e(BTamurae$B$5$s$O!":G8e$N$O4{[email protected]$$$F$^$9!JITMW$G$9!K!#e(B

http://github.com/nahi/ruby/commit/14c080d3687dd10fb80d38117e179d93e074b092
http://github.com/nahi/ruby/commit/edff118cccd4ea4dd801244d13a53596ec483945
http://github.com/nahi/ruby/commit/3b3f033f9796a720335e2a220c59cef2a512c128
http://github.com/nahi/ruby/commit/5237204392131f126646dddd5b8c09b214b00fdb
http://github.com/nahi/ruby/commit/274b9e41a4dd387c32ea4aebd7ba623f1753fb05

e$B$A$c$s$He(B1.9e$B$be(Btopic

branche$B:n$k$+!"$;$a$Fe(Bmergee$B$7$J$-$c$h$+$C$?!#e(B

e$B%(%i!<$,=P$k$N$Oe(BMacPorts e$B$G$$$l$?e(B OpenSSL 0.9.8n e$B$G$9!#e(B
Apple e$BDs6!$Ne(B OpenSSL 0.9.8l e$B$G$O%(%i!<$,=P$^$;$s!#e(B

e$B$O$$!"$=$N$O$:$G$9!#e(BOpenSSLe$BB&$NJQ99$X$NDI=>$G$9!#e(B

e$B%A%1%C%He(B #2604 e$B$,99?7$5$l$^$7$?!#e(B (by Takashi T.)

OKe$B$G$7$?!#%(%i!<$,=P$J$/$J$j$^$7$?!#e(B

$ ./miniruby -I…/ruby19/lib -I.ext/common -I./-
-r…/ruby19/ext/purelib.rb …/ruby19/tool/runruby.rb --extout=.ext –
“…/ruby19/test/runner.rb” …/ruby19/test/openssl
Loaded suite …/ruby19/test/runner
Started

Finished in 4.961459 seconds.

107 tests, 1219 assertions, 0 failures, 0 errors, 0 skips

Test run options: --seed 7315

$ ./ruby -v
ruby 1.9.2dev (2010-03-31 trunk 27125) [x86_64-darwin10.3.0]


http://redmine.ruby-lang.org/issues/show/2604

e$B%A%1%C%He(B #2604 e$B$,99?7$5$l$^$7$?!#e(B (by Hiroshi NAKAMURA)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BRejectede$B$KJQ99e(B

ruby 1.8.7-p302e$B$G!"e(Bshyouheie$B$5$s$K<h$j9~$s$G$b$i$$$^$7$?!#e(B
ECe$B$N%F%9%H$K$;$he(BOpenSSL
1.0.0e$BBP1~$K$;$h!“IT6q9g$,;D$C$F$$$k$h$&$G$”$l$Pe(B
reopene$B$7$F$/[email protected]$5$$!#e(B

http://redmine.ruby-lang.org/issues/show/2604

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs