Skip to content

[pull] master from ruby:master - #1365

Merged
pull[bot] merged 7 commits into
turkdevops:masterfrom
ruby:master
Aug 31, 2026
Merged

[pull] master from ruby:master#1365
pull[bot] merged 7 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull

@pull pull Bot commented Aug 31, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

hsbt and others added 7 commits August 31, 2026 07:29
…uild

Ruby master added `handle_weak_references` to `rb_data_type_struct`, and no released `magnus` compiles against it, so the generated crate fails to build on `ruby-head`. Key the skip on that field being present in `rtypeddata.h` rather than on a hardcoded Ruby version.

ruby/rubygems@5b2d117248
Although OpenSSL::SSL::SSLServer presents itself as a TCPServer-like
wrapper, its design has flaws. Document OpenSSL::SSL::SSLServer as
deprecated and recommend using OpenSSL::SSL::SSLSocket directly.

SSLServer#accept calls #accept on the underlying listening socket and
then performs the TLS handshake synchronously. This is an obvious
problem for programs that expect more than one client to connect.

Fixing this would require keeping a backlog of accepted TCP connections
in SSLServer while their TLS handshakes complete, which would be too
significant a change.

This is also why SSLServer#accept_nonblock was never implemented.

The blocking behavior of #accept can be worked around by setting
SSLServer#start_immediately to false, which skips the handshake.
However, at that point SSLServer provides little value over using
TCPServer directly and wrapping each accepted socket with SSLSocket.

ruby/openssl@a77ed4b990
r8081 originally intended test_pair.rb for testing methods that behave
like IO.

Move tests for #{get,read}byte, #sys{read,write}, #close_write, and
IO.copy_stream from test_ssl.rb to test_pair.rb.

Similarly, move tests for methods that are specific to SSLSocket and
not for IO compatibility to test_ssl.rb.

ruby/openssl@297a003651
OpenSSL::SSL::SSLSocket only depends on T_FILE and a small number of
methods defined on IO, so the difference between TCPSocket and Socket
is not significant for these tests. Test only one of them to reduce
the test run time by half.

Add a simple client using Socket to test_ssl.rb to keep basic coverage.

Also simplify ut_eof.rb to test only one direction, since the direction
does not matter after the handshake.

ruby/openssl@7063d04b43
Break it into multiple pieces and simplify:

  - Let callers pass a complete SSLContext object instead of a
    callback proc ctx_proc to mutate it.

  - Add a variant start_server_proc for tests that need finer control,
    and remove two callbacks server_proc and accept_proc.

  - Remove rescue for IOError, Errno::EBADF, Errno::EINVAL, and
    Errno::ENOTSOCK which as far as I can tell should not be possible.

ruby/openssl@b67520ff55
Some tests expect server-side SSLSocket#accept to fail for various
reasons. On some systems, closing the underlying socket immediately
with IO#close causes the TCP connection to be terminated with RST.

Do not close it immediately so that the client can reliably receive
the TLS alert. This allows writing more meaningful assertions.

Also add a dedicated test case for the rb_sys_fail() path in
SSLSocket#connect.

ruby/openssl@fc60c97ee3
Update more tests to use start_server_proc instead of UNIXSocket.pair.
It runs threads with timeout and prevents "rake test" from hanging
indefinitely. It also produces better error messages when a test fails.

ruby/openssl@c30c576522
@pull pull Bot locked and limited conversation to collaborators Aug 31, 2026
@pull pull Bot added the ⤵️ pull label Aug 31, 2026
@pull
pull Bot merged commit 11bd0c2 into turkdevops:master Aug 31, 2026
1 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants