1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
tenderlove 2015-08-20 21:39:54 +00:00
parent 777f319d8c
commit f7af0318a3
2 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,10 @@
Fri Aug 21 06:35:50 2015 Aaron Patterson <tenderlove@ruby-lang.org>
* 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]
Thu Aug 20 22:19:17 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_method.c (basic_obj_respond_to): call respond_to_missing?

View file

@ -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