https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112011-06-22T17:59:43ZRuby Issue Tracking SystemRuby master - Bug #4919: OpenSSL::SSL::Sesssion#time= に Bignum を渡すと ArgumentError が発生するhttps://redmine.ruby-lang.org/issues/4919?journal_id=181462011-06-22T17:59:43ZMartinBosslet (Martin Bosslet)Martin.Bosslet@gmail.com
<ul></ul><p>I get the same result for OpenSSL 0.9.8k plus an additional error when running</p>
<p>make test-all -TESTS="openssl"</p>
<p>on revision 32199.</p>
<ol>
<li>
<p>Error:<br>
test_connect_and_close(OpenSSL::TestSSL):<br>
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read finished A: sslv3 alert illegal parameter<br>
/home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl.rb:46:in <code>connect' /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl.rb:46:in </code>block in test_connect_and_close'<br>
/home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/utils.rb:280:in <code>call' /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/utils.rb:280:in </code>start_server'<br>
/home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl.rb:35:in `test_connect_and_close'</p>
</li>
<li>
<p>Error:<br>
test_session(OpenSSL::TestSSLSession):<br>
ArgumentError: unknown type<br>
/home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl_session.rb:21:in <code>time=' /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl_session.rb:21:in </code>block in test_session'<br>
/home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/utils.rb:280:in <code>call' /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/utils.rb:280:in </code>start_server'<br>
/home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl_session.rb:7:in `test_session'</p>
</li>
</ol>
<p>The latter can be solved by Tomoyuki's suggested fix.</p>
<p>Two questions:</p>
<ol>
<li>Is it OK if I apply the fix?</li>
<li>Anyone else getting the "sslv3 alert illegal parameter"? I get it most of the time but not always...</li>
</ol>
<p>Regards,<br>
Martin</p> Ruby master - Bug #4919: OpenSSL::SSL::Sesssion#time= に Bignum を渡すと ArgumentError が発生するhttps://redmine.ruby-lang.org/issues/4919?journal_id=181472011-06-22T18:45:58Znagachika (Tomoyuki Chikanaga)nagachika00@gmail.com
<ul></ul><p>Hi, Martin</p>
<blockquote>
<ol>
<li>Is it OK if I apply the fix?<br>
Yes, please apply it. :)</li>
</ol>
</blockquote>
<blockquote>
<ol start="2">
<li>Anyone else getting the "sslv3 alert illegal parameter"? I get it most of the time but not always...<br>
I can't get this error on Ubuntu 10.4 with openssl(0.9.8k-7ubuntu).</li>
</ol>
</blockquote>
<p>Regards,</p> Ruby master - Bug #4919: OpenSSL::SSL::Sesssion#time= に Bignum を渡すと ArgumentError が発生するhttps://redmine.ruby-lang.org/issues/4919?journal_id=181492011-06-22T22:28:19ZAnonymous
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset r32203.<br>
Tomoyuki, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<ul>
<li>ext/openssl/ossl_ssl_session.c: Respect T_BIGNUM time values. Patch by<br>
Tomoyuki Chikanaga.<br>
[ Ruby 1.9 - Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: OpenSSL::SSL::Sesssion#time= に Bignum を渡すと ArgumentError が発生する (Closed)" href="https://redmine.ruby-lang.org/issues/4919">#4919</a> ] <a href="/issues/4919">[ruby-dev:43869]</a></li>
</ul> Ruby master - Bug #4919: OpenSSL::SSL::Sesssion#time= に Bignum を渡すと ArgumentError が発生するhttps://redmine.ruby-lang.org/issues/4919?journal_id=181762011-06-23T19:53:08Znahi (Hiroshi Nakamura)nakahiro@gmail.com
<ul><li><strong>ruby -v</strong> changed from <i>ruby 1.9.3dev (2011-06-22 trunk 32198) [i686-linux]</i> to <i>-</i></li></ul><p>報告ありがとうございます。32bit環境で落ちるとか考えてませんでした。。。<br>
Thanks for the report. I was not aware that the code has 64bit dependency...</p>
<p>On Wed, Jun 22, 2011 at 18:45, Tomoyuki Chikanaga <a href="mailto:nagachika00@gmail.com" class="email">nagachika00@gmail.com</a> wrote:</p>
<blockquote>
<blockquote>
<ol>
<li>Is it OK if I apply the fix?<br>
Yes, please apply it. :)</li>
</ol>
</blockquote>
</blockquote>
<p>I modified it a little at r32211.</p>
<p>Martin, please add a test when you commit a gift patch. Thanks!</p>
<blockquote>
<blockquote>
<ol start="2">
<li>Anyone else getting the "sslv3 alert illegal parameter"? I get it most of the time but not always...<br>
I can't get this error on Ubuntu 10.4 with openssl(0.9.8k-7ubuntu).</li>
</ol>
</blockquote>
</blockquote>
<p>Please file it.</p>
<p>Regards,<br>
// NaHi</p> Ruby master - Bug #4919: OpenSSL::SSL::Sesssion#time= に Bignum を渡すと ArgumentError が発生するhttps://redmine.ruby-lang.org/issues/4919?journal_id=181772011-06-23T19:53:08Znahi (Hiroshi Nakamura)nakahiro@gmail.com
<ul></ul><p>報告ありがとうございます。32bit環境で落ちるとか考えてませんでした。。。<br>
Thanks for the report. I was not aware that the code has 64bit dependency...</p>
<p>On Wed, Jun 22, 2011 at 18:45, Tomoyuki Chikanaga <a href="mailto:nagachika00@gmail.com" class="email">nagachika00@gmail.com</a> wrote:</p>
<blockquote>
<blockquote>
<ol>
<li>Is it OK if I apply the fix?<br>
Yes, please apply it. :)</li>
</ol>
</blockquote>
</blockquote>
<p>I modified it a little at r32211.</p>
<p>Martin, please add a test when you commit a gift patch. Thanks!</p>
<blockquote>
<blockquote>
<ol start="2">
<li>Anyone else getting the "sslv3 alert illegal parameter"? I get it most of the time but not always...<br>
I can't get this error on Ubuntu 10.4 with openssl(0.9.8k-7ubuntu).</li>
</ol>
</blockquote>
</blockquote>
<p>Please file it.</p>
<p>Regards,<br>
// NaHi</p> Ruby master - Bug #4919: OpenSSL::SSL::Sesssion#time= に Bignum を渡すと ArgumentError が発生するhttps://redmine.ruby-lang.org/issues/4919?journal_id=181802011-06-23T19:59:06ZMartinBosslet (Martin Bosslet)Martin.Bosslet@gmail.com
<ul></ul><p>2011/6/23 Hiroshi Nakamura <a href="mailto:nakahiro@gmail.com" class="email">nakahiro@gmail.com</a>:</p>
<blockquote>
<p>報告ありがとうございます。32bit環境で落ちるとか考えてませんでした。。。<br>
Thanks for the report. I was not aware that the code has 64bit dependency...</p>
<p>On Wed, Jun 22, 2011 at 18:45, Tomoyuki Chikanaga <a href="mailto:nagachika00@gmail.com" class="email">nagachika00@gmail.com</a> wrote:</p>
<blockquote>
<blockquote>
<ol>
<li>Is it OK if I apply the fix?<br>
Yes, please apply it. :)</li>
</ol>
</blockquote>
</blockquote>
<p>I modified it a little at r32211.</p>
</blockquote>
<p>This gives me: (Ubuntu 10.04 32bit, OpenSSL 0.9.8k)</p>
<ol>
<li>
<p>Error:<br>
test_session_time(OpenSSL::TestSSLSession):<br>
RangeError: bignum too big to convert into <code>long' /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl_session.rb:71:in </code>time='<br>
/home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl_session.rb:71:in<br>
`test_session_time'</p>
</li>
<li>
<p>Error:<br>
test_session_timeout(OpenSSL::TestSSLSession):<br>
RangeError: bignum too big to convert into <code>long' /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl_session.rb:84:in </code>timeout='<br>
/home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl_session.rb:84:in<br>
`test_session_timeout'</p>
</li>
</ol>
<blockquote>
<p>Martin, please add a test when you commit a gift patch. Thanks!</p>
</blockquote>
<p>I assumed the broken test would cover the patch code - but you're<br>
right, I should add tests<br>
that specifically test new features/improvements - I'll pay more<br>
attention to that in the future!</p>
<blockquote>
<blockquote>
<blockquote>
<ol start="2">
<li>Anyone else getting the "sslv3 alert illegal parameter"? I get it most of the time but not always...<br>
I can't get this error on Ubuntu 10.4 with openssl(0.9.8k-7ubuntu).</li>
</ol>
</blockquote>
</blockquote>
<p>Please file it.</p>
</blockquote>
<p>Just wanted to do that, but it seems it's fixed in 32211 - can't<br>
reproduce it anymore :)</p>
<p>Regards,<br>
Martin</p> Ruby master - Bug #4919: OpenSSL::SSL::Sesssion#time= に Bignum を渡すと ArgumentError が発生するhttps://redmine.ruby-lang.org/issues/4919?journal_id=181812011-06-23T19:59:06ZMartinBosslet (Martin Bosslet)Martin.Bosslet@gmail.com
<ul></ul><p>2011/6/23 Hiroshi Nakamura <a href="mailto:nakahiro@gmail.com" class="email">nakahiro@gmail.com</a>:</p>
<blockquote>
<p>報告ありがとうございます。32bit環境で落ちるとか考えてませんでした。。。<br>
Thanks for the report. I was not aware that the code has 64bit dependency...</p>
<p>On Wed, Jun 22, 2011 at 18:45, Tomoyuki Chikanaga <a href="mailto:nagachika00@gmail.com" class="email">nagachika00@gmail.com</a> wrote:</p>
<blockquote>
<blockquote>
<ol>
<li>Is it OK if I apply the fix?<br>
Yes, please apply it. :)</li>
</ol>
</blockquote>
</blockquote>
<p>I modified it a little at r32211.</p>
</blockquote>
<p>This gives me: (Ubuntu 10.04 32bit, OpenSSL 0.9.8k)</p>
<ol>
<li>
<p>Error:<br>
test_session_time(OpenSSL::TestSSLSession):<br>
RangeError: bignum too big to convert into <code>long' /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl_session.rb:71:in </code>time='<br>
/home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl_session.rb:71:in<br>
`test_session_time'</p>
</li>
<li>
<p>Error:<br>
test_session_timeout(OpenSSL::TestSSLSession):<br>
RangeError: bignum too big to convert into <code>long' /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl_session.rb:84:in </code>timeout='<br>
/home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl_session.rb:84:in<br>
`test_session_timeout'</p>
</li>
</ol>
<blockquote>
<p>Martin, please add a test when you commit a gift patch. Thanks!</p>
</blockquote>
<p>I assumed the broken test would cover the patch code - but you're<br>
right, I should add tests<br>
that specifically test new features/improvements - I'll pay more<br>
attention to that in the future!</p>
<blockquote>
<blockquote>
<blockquote>
<ol start="2">
<li>Anyone else getting the "sslv3 alert illegal parameter"? I get it most of the time but not always...<br>
I can't get this error on Ubuntu 10.4 with openssl(0.9.8k-7ubuntu).</li>
</ol>
</blockquote>
</blockquote>
<p>Please file it.</p>
</blockquote>
<p>Just wanted to do that, but it seems it's fixed in 32211 - can't<br>
reproduce it anymore :)</p>
<p>Regards,<br>
Martin</p> Ruby master - Bug #4919: OpenSSL::SSL::Sesssion#time= に Bignum を渡すと ArgumentError が発生するhttps://redmine.ruby-lang.org/issues/4919?journal_id=181852011-06-23T22:23:06Znahi (Hiroshi Nakamura)nakahiro@gmail.com
<ul></ul><p>2011/6/23 Martin Boßlet <a href="mailto:martin.bosslet@googlemail.com" class="email">martin.bosslet@googlemail.com</a>:</p>
<blockquote>
<blockquote>
<p>I modified it a little at r32211.</p>
</blockquote>
<p>This gives me: (Ubuntu 10.04 32bit, OpenSSL 0.9.8k)</p>
</blockquote>
<p>Aaaaarhg! Sorry, 2**31 is not in a signed long value. Miserable me...<br>
Fixed at r32212.</p>
<blockquote>
<blockquote>
<p>Martin, please add a test when you commit a gift patch. Thanks!</p>
</blockquote>
<p>I assumed the broken test would cover the patch code - but you're<br>
right, I should add tests<br>
that specifically test new features/improvements - I'll pay more<br>
attention to that in the future!</p>
</blockquote>
<p>Ah, sure, I should have written more tests when I wrote a testcase.</p>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<ol start="2">
<li>Anyone else getting the "sslv3 alert illegal parameter"? I get it most of the time but not always...<br>
I can't get this error on Ubuntu 10.4 with openssl(0.9.8k-7ubuntu).</li>
</ol>
</blockquote>
</blockquote>
<p>Please file it.</p>
</blockquote>
<p>Just wanted to do that, but it seems it's fixed in 32211 - can't<br>
reproduce it anymore :)</p>
</blockquote>
<p>Indeed? I don't think fixes of today affect SSL negotiation... Please<br>
file a new ticket when you get kind of SSL error next time. Log dump<br>
(w/o reproducible script) is far better than nothing.</p>
<p>Regards,<br>
// NaHi</p> Ruby master - Bug #4919: OpenSSL::SSL::Sesssion#time= に Bignum を渡すと ArgumentError が発生するhttps://redmine.ruby-lang.org/issues/4919?journal_id=181862011-06-23T22:23:06Znahi (Hiroshi Nakamura)nakahiro@gmail.com
<ul></ul><p>2011/6/23 Martin Boßlet <a href="mailto:martin.bosslet@googlemail.com" class="email">martin.bosslet@googlemail.com</a>:</p>
<blockquote>
<blockquote>
<p>I modified it a little at r32211.</p>
</blockquote>
<p>This gives me: (Ubuntu 10.04 32bit, OpenSSL 0.9.8k)</p>
</blockquote>
<p>Aaaaarhg! Sorry, 2**31 is not in a signed long value. Miserable me...<br>
Fixed at r32212.</p>
<blockquote>
<blockquote>
<p>Martin, please add a test when you commit a gift patch. Thanks!</p>
</blockquote>
<p>I assumed the broken test would cover the patch code - but you're<br>
right, I should add tests<br>
that specifically test new features/improvements - I'll pay more<br>
attention to that in the future!</p>
</blockquote>
<p>Ah, sure, I should have written more tests when I wrote a testcase.</p>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<ol start="2">
<li>Anyone else getting the "sslv3 alert illegal parameter"? I get it most of the time but not always...<br>
I can't get this error on Ubuntu 10.4 with openssl(0.9.8k-7ubuntu).</li>
</ol>
</blockquote>
</blockquote>
<p>Please file it.</p>
</blockquote>
<p>Just wanted to do that, but it seems it's fixed in 32211 - can't<br>
reproduce it anymore :)</p>
</blockquote>
<p>Indeed? I don't think fixes of today affect SSL negotiation... Please<br>
file a new ticket when you get kind of SSL error next time. Log dump<br>
(w/o reproducible script) is far better than nothing.</p>
<p>Regards,<br>
// NaHi</p> Ruby master - Bug #4919: OpenSSL::SSL::Sesssion#time= に Bignum を渡すと ArgumentError が発生するhttps://redmine.ruby-lang.org/issues/4919?journal_id=181922011-06-23T23:54:50ZMartinBosslet (Martin Bosslet)Martin.Bosslet@gmail.com
<ul></ul><p>Hiroshi NAKAMURA wrote:</p>
<blockquote>
<p>Aaaaarhg! Sorry, 2**31 is not in a signed long value. Miserable me...<br>
Fixed at r32212.</p>
</blockquote>
<p>No problem, works fine now. Happens to the best of us ;)</p>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<ol start="2">
<li>Anyone else getting the "sslv3 alert illegal parameter"? I get it most of the time but not always...<br>
I can't get this error on Ubuntu 10.4 with openssl(0.9.8k-7ubuntu).</li>
</ol>
</blockquote>
</blockquote>
<p>Please file it.</p>
</blockquote>
<p>Just wanted to do that, but it seems it's fixed in 32211 - can't<br>
reproduce it anymore :)</p>
</blockquote>
<p>Indeed? I don't think fixes of today affect SSL negotiation... Please<br>
file a new ticket when you get kind of SSL error next time. Log dump<br>
(w/o reproducible script) is far better than nothing.</p>
</blockquote>
<p>I was finally able to reproduce it, although with a different error message this time. Cf. <a href="http://redmine.ruby-lang.org/issues/4923" class="external">http://redmine.ruby-lang.org/issues/4923</a>. I suspect it could be related to OpenSSL 1.0.0, since I could not reproduce it with 0.9.8k.</p>
<p>Regards,<br>
Martin</p>