[ruby-cvs:61628] normal:r54466 (trunk): openssl: accept moving write buffer for write_nonblock

normal at ruby-lang.org normal at ruby-lang.org
Fri Apr 1 05:33:55 JST 2016


normal	2016-04-01 05:33:55 +0900 (Fri, 01 Apr 2016)

  New Revision: 54466

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54466

  Log:
    openssl: accept moving write buffer for write_nonblock
    
    By setting the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag.
    This flag was introduced at the same time as
    SSL_MODE_ENABLE_PARTIAL_WRITE in OpenSSL 0.9.4 and makes usage
    with non-blocking sockets much easier.
    
    Before this, a Rubyist would need to remember the exact object
    which failed to write and reuse it later when the socket became
    writable again.  This causes problems when the buffer is given
    by another layer of the application (e.g. a buffer is given
    by a Rack middleware or application to a Rack web server).
    
    * ext/openssl/ossl_ssl.c (ossl_sslctx_s_alloc):
      enable SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER by default
      [Bug #12126]

  Modified files:
    trunk/ChangeLog
    trunk/ext/openssl/ossl_ssl.c
    trunk/test/openssl/test_pair.rb


More information about the ruby-cvs mailing list