From c35c4baa58ee6b5e041a0657aa780d84694417cd Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 14 Aug 2015 02:58:49 +0000 Subject: 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 --- test/openssl/test_ssl_session.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/openssl/test_ssl_session.rb') diff --git a/test/openssl/test_ssl_session.rb b/test/openssl/test_ssl_session.rb index 0c384c731a..5ce93b52a9 100644 --- a/test/openssl/test_ssl_session.rb +++ b/test/openssl/test_ssl_session.rb @@ -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 -- cgit v1.2.3