ruby-changes:39488
From: nobu <ko1@a...>
Date: Fri, 14 Aug 2015 11:59:22 +0900 (JST)
Subject: [ruby-changes:39488] nobu:r51569 (trunk): test_ssl_session.rb: check SSL method
nobu 2015-08-14 11:58:49 +0900 (Fri, 14 Aug 2015) New Revision: 51569 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51569 Log: 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. Modified files: trunk/test/openssl/test_ssl_session.rb Index: test/openssl/test_ssl_session.rb =================================================================== --- test/openssl/test_ssl_session.rb (revision 51568) +++ test/openssl/test_ssl_session.rb (revision 51569) @@ -312,6 +312,9 @@ __EOS__ https://github.com/ruby/ruby/blob/trunk/test/openssl/test_ssl_session.rb#L312 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__ https://github.com/ruby/ruby/blob/trunk/test/openssl/test_ssl_session.rb#L358 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/