79 lines
2.7 KiB
Diff
79 lines
2.7 KiB
Diff
--- a/test/openssl/test_ssl.rb
|
|
+++ b/test/openssl/test_ssl.rb
|
|
@@ -67,6 +67,8 @@
|
|
assert_equal @svr_cert.subject, ssl.peer_cert.subject
|
|
assert_equal [@svr_cert.subject, @ca_cert.subject],
|
|
ssl.peer_cert_chain.map(&:subject)
|
|
+
|
|
+ ssl.puts "abc"; assert_equal "abc\n", ssl.gets
|
|
}
|
|
end
|
|
end
|
|
@@ -892,7 +894,9 @@
|
|
}
|
|
start_server(ctx_proc: ctx_proc, ignore_listener_error: true) do |port|
|
|
begin
|
|
- server_connect(port) { }
|
|
+ server_connect(port) { |ssl|
|
|
+ ssl.puts "abc"; assert_equal "abc\n", ssl.gets
|
|
+ }
|
|
rescue OpenSSL::SSL::SSLError, Errno::ECONNRESET
|
|
else
|
|
supported << ver
|
|
@@ -950,6 +954,7 @@
|
|
if ver == cver
|
|
server_connect(port, ctx1) { |ssl|
|
|
assert_equal vmap[cver][:name], ssl.ssl_version
|
|
+ ssl.puts "abc"; assert_equal "abc\n", ssl.gets
|
|
}
|
|
else
|
|
assert_handshake_error { server_connect(port, ctx1) { } }
|
|
@@ -963,6 +968,7 @@
|
|
if ver == cver
|
|
server_connect(port, ctx2) { |ssl|
|
|
assert_equal vmap[cver][:name], ssl.ssl_version
|
|
+ ssl.puts "abc"; assert_equal "abc\n", ssl.gets
|
|
}
|
|
else
|
|
assert_handshake_error { server_connect(port, ctx2) { } }
|
|
@@ -975,6 +981,7 @@
|
|
ctx3.min_version = ctx3.max_version = nil
|
|
server_connect(port, ctx3) { |ssl|
|
|
assert_equal vmap[ver][:name], ssl.ssl_version
|
|
+ ssl.puts "abc"; assert_equal "abc\n", ssl.gets
|
|
}
|
|
}
|
|
end
|
|
@@ -993,6 +1000,7 @@
|
|
ctx1.min_version = cver
|
|
server_connect(port, ctx1) { |ssl|
|
|
assert_equal vmap[supported.last][:name], ssl.ssl_version
|
|
+ ssl.puts "abc"; assert_equal "abc\n", ssl.gets
|
|
}
|
|
|
|
# Client sets max_version
|
|
@@ -1001,6 +1009,7 @@
|
|
if cver >= sver
|
|
server_connect(port, ctx2) { |ssl|
|
|
assert_equal vmap[cver][:name], ssl.ssl_version
|
|
+ ssl.puts "abc"; assert_equal "abc\n", ssl.gets
|
|
}
|
|
else
|
|
assert_handshake_error { server_connect(port, ctx2) { } }
|
|
@@ -1019,6 +1028,7 @@
|
|
if cver <= sver
|
|
server_connect(port, ctx1) { |ssl|
|
|
assert_equal vmap[sver][:name], ssl.ssl_version
|
|
+ ssl.puts "abc"; assert_equal "abc\n", ssl.gets
|
|
}
|
|
else
|
|
assert_handshake_error { server_connect(port, ctx1) { } }
|
|
@@ -1033,6 +1043,7 @@
|
|
else
|
|
assert_equal vmap[cver][:name], ssl.ssl_version
|
|
end
|
|
+ ssl.puts "abc"; assert_equal "abc\n", ssl.gets
|
|
}
|
|
end
|
|
}
|