1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_ssl_session.rb: check SSL method

* test/openssl/test_ssl_session.rb (test_ctx_server_session_cb):
  ensure the method to be tested is supported.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-08-14 02:58:49 +00:00
parent bcf1fcfeb2
commit a829577a8c

View file

@ -312,6 +312,9 @@ __EOS__
end
def test_ctx_server_session_cb
method = "SSLv3"
assert_include(OpenSSL::SSL::SSLContext::METHODS.map(&:to_s), method)
called = {}
ctx_proc = Proc.new { |ctx, ssl|
@ -355,7 +358,7 @@ __EOS__
3.times do
sock = TCPSocket.new("127.0.0.1", port)
begin
ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new("SSLv3"))
ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new(method))
ssl.sync_close = true
ssl.session = last_client_session if last_client_session
ssl.connect