Expose SSL_shutdown() directly so that Ruby programs can control closure of connection more precisely. Update SSLSocket#sysclose and #close_write to use this method. They rescue SystemCallError and SSLError to preserve the existing beha...rhenium (Kazuki Yamaguchi)
Prepare the Array objects for the argument inside rb_protect(). This object allocation may potentially raise an exception and corrupt OpenSSL's internal state. Also look up the callback Proc objects directly from SSLContext's instance v...rhenium (Kazuki Yamaguchi)
Simplify handling of the temporary rb_protect() jump states. This also avoids potential corruption of OpenSSL's internal state if the SSLSocket object is frozen in the middle of SSL_*() calls. Also, skip calling Ruby callbacks while we ...rhenium (Kazuki Yamaguchi)
Use rb_protect() to avoid exiting from SSL_accept() or SSL_read() prematurely. Also set the callback to SSL_CTX instead of SSL, similarly to what we do for other callbacks configurable on SSLContext. https://github.com/ruby/openssl/com...rhenium (Kazuki Yamaguchi)
Currently, if the callback raises an exception or returns an invalid value, the handshake is resumed as if the callback has not been called. This is contrary to the documentation. Propagate exceptions raised by the callback to the origi...rhenium (Kazuki Yamaguchi)
Currently, verify_callback has no common place to store the jump tag type when an exception is raised or the thread is interrupted, so it suppresses the jump and emits a warning instead. Use Fiber-local storage for the callback state. W...rhenium (Kazuki Yamaguchi)
ossl_clear_error() is often used when we are about to resume a jump with rb_jump_tag(). It should not raise an exception or clobber the current errinfo. https://github.com/ruby/openssl/commit/d59a3a8508rhenium (Kazuki Yamaguchi)
buffers (https://github.com/ruby/stringio/pull/238) This fixes two minor inconsistent behaviors when reading from a `StringIO` with length==0 and an output buffer: --- **Return the given buffer in StringIO#read(0, buf)** Make it behav...rhenium (Kazuki Yamaguchi)
A custom write method on an IO-like object can retain the buffer String and resize it from another thread while a subsequent chunk is being read into the String without the GVL. Lock the String with rb_str_locktmp() during the read to pr...rhenium (Kazuki Yamaguchi)
Applied in changeset commit:git|06b18f11f4b0078e2683c661e7762fff7c04636c. ---------- io.c: handle 0 and negative lengths in IO#sysread and IO#pread Make them consistent with IO#readpartial and other read methods. For a negative length,...rhenium (Kazuki Yamaguchi)