From: Eric Wong Date: 2016-02-27T02:13:40+00:00 Subject: [ruby-core:74017] Re: [Ruby trunk Feature#12085] [PATCH] OpenSSL::SSL::SSLSocket#write_nonblock: expand documentation normalperson@yhbt.net wrote: > I do not plan to commit the test change since OpenSSL behavior > may be improved in the future. I just discovered SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER, which might've saved me plenty of headaches earlier this month: --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -145,7 +145,8 @@ static VALUE ossl_sslctx_s_alloc(VALUE klass) { SSL_CTX *ctx; - long mode = SSL_MODE_ENABLE_PARTIAL_WRITE; + long mode = SSL_MODE_ENABLE_PARTIAL_WRITE | + SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER; VALUE obj; #ifdef SSL_MODE_RELEASE_BUFFERS This flag is documented in SSL_CTX_set_mode(3SSL) and has been around since SSL_MODE_ENABLE_PARTIAL_WRITE was introduced. I haven't tested the effects of this flag, yet, as I've already worked around the lack of this flag in a project which uses the OpenSSL extension. Unsubscribe: