aboutsummaryrefslogtreecommitdiffstats
path: root/test/openssl
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-20 21:39:54 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-20 21:39:54 +0000
commitf7af0318a33a649f992f111ed8ed39e280e1b21e (patch)
tree8de7164067ebfc6564bc119278a31e38fa25925d /test/openssl
parent777f319d8cf9138aa34da27685e8399cb95926bc (diff)
downloadruby-f7af0318a33a649f992f111ed8ed39e280e1b21e.tar.gz
* 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 <code@jeremyevans.net> for the patches. [Bug #11366] [Bug #11367] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl')
-rw-r--r--test/openssl/test_ssl_session.rb6
1 files changed, 2 insertions, 4 deletions
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