From 69e671aa966f7d9ef67513141f593e61be58e2d3 Mon Sep 17 00:00:00 2001 From: usa Date: Wed, 18 Nov 2015 11:13:07 +0000 Subject: merge revision(s) 51569,51649: [Backport #11367] 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. * 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/branches/ruby_2_1@52638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/openssl/test_ssl_session.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/openssl/test_ssl_session.rb b/test/openssl/test_ssl_session.rb index 5d08e7f780..f291c5d246 100644 --- a/test/openssl/test_ssl_session.rb +++ b/test/openssl/test_ssl_session.rb @@ -307,6 +307,7 @@ __EOS__ 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 @@ -345,7 +346,7 @@ __EOS__ last_client_session = nil 3.times do sock = TCPSocket.new("127.0.0.1", port) - ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new("SSLv3")) + 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