[ruby/openssl] ssl: update test_accept_errors_include_peeraddr test case

Use a different invalid data example to prevent SSLSocket#accept from
reaching EOF.

https://github.com/ruby/openssl/commit/2e089c1916
This commit is contained in:
Kazuki Yamaguchi 2021-12-12 00:28:35 +09:00
parent 0b3482c0e7
commit 15eefd30ad

View File

@ -893,14 +893,12 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
end
end
begin
sock = TCPSocket.new("127.0.0.1", port)
sock.puts "abc"
ensure
sock&.close
end
sock = TCPSocket.new("127.0.0.1", port)
sock << "\x00" * 1024
assert t.join
ensure
sock&.close
server.close
end