From f7af0318a33a649f992f111ed8ed39e280e1b21e Mon Sep 17 00:00:00 2001 From: tenderlove Date: Thu, 20 Aug 2015 21:39:54 +0000 Subject: * test/openssl/test_ssl_session.rb: Fix tests so that they take in to account OpenSSL installations that have SSLv3 disabled by default. Thanks Jeremy Evans for the patches. [Bug #11366] [Bug #11367] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/openssl/test_ssl_session.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/openssl/test_ssl_session.rb b/test/openssl/test_ssl_session.rb index 5ce93b52a9..28d268e76b 100644 --- a/test/openssl/test_ssl_session.rb +++ b/test/openssl/test_ssl_session.rb @@ -312,13 +312,11 @@ __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| ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_SERVER + ctx.options = OpenSSL::SSL::OP_NO_TICKET last_server_session = nil # get_cb is called whenever a client proposed to resume a session but @@ -358,7 +356,7 @@ __EOS__ 3.times do sock = TCPSocket.new("127.0.0.1", port) begin - ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new(method)) + ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new()) ssl.sync_close = true ssl.session = last_client_session if last_client_session ssl.connect -- cgit v1.2.3