Issue #4919 has been updated by Tomoyuki Chikanaga.


Hi, Martin

>1) Is it OK if I apply the fix?
Yes, please apply it. :)

>2) Anyone else getting the "sslv3 alert illegal parameter"? I get it most of the time but not always...
I can't get this error on Ubuntu 10.4 with openssl(0.9.8k-7ubuntu).

Regards,
----------------------------------------
Bug #4919: OpenSSL::SSL::Sesssion#time= ??? Bignum ???渡????? ArgumentError ?????????????
http://redmine.ruby-lang.org/issues/4919

Author: Tomoyuki Chikanaga
Status: Open
Priority: Normal
Assignee: 
Category: ext
Target version: 1.9.2
ruby -v: ruby 1.9.3dev (2011-06-22 trunk 32198) [i686-linux]


????????????????? make test-all TESTS="-v openssl/test_ssl_session.rb" ?????????????? 1E ????????????

  1) Error:
test_session(OpenSSL::TestSSLSession):
ArgumentError: unknown type
    /opt/ruby-trunk/src/ruby/test/openssl/test_ssl_session.rb:21:in `time='
    /opt/ruby-trunk/src/ruby/test/openssl/test_ssl_session.rb:21:in `block in test_session'
    /opt/ruby-trunk/src/ruby/test/openssl/utils.rb:280:in `call'
    /opt/ruby-trunk/src/ruby/test/openssl/utils.rb:280:in `start_server'
    /opt/ruby-trunk/src/ruby/test/openssl/test_ssl_session.rb:7:in `test_session'

32bit ?????????? Time.now.to_i ??? Bignum ????????OpenSSL::SSL::Sesssion#time= ?????????????????????弾???????????????

?????????????以???????????? Bignum ?????????????????????????????????????????????Error?????????????????????

--- a/ext/openssl/ossl_ssl_session.c
+++ b/ext/openssl/ossl_ssl_session.c
@@ -149,7 +149,7 @@ static VALUE ossl_ssl_session_get_timeout(VALUE self)
                                                                              \
                if (rb_obj_is_instance_of(time_v, rb_cTime)) {                \
                        time_v = rb_funcall(time_v, rb_intern("to_i"), 0);    \
-               } else if (FIXNUM_P(time_v)) {                                \
+               } else if (FIXNUM_P(time_v) || TYPE(time_v) == T_BIGNUM) {     \
                        ;                                                     \
                } else {                                                      \
                        rb_raise(rb_eArgError, "unknown type");               \



-- 
http://redmine.ruby-lang.org