Bug #10046 ยป 0001-Don-t-use-obsolete-SSLv3-for-tests.patch
test/openssl/test_ssl_session.rb | ||
---|---|---|
def test_ctx_client_session_cb
|
||
called = {}
|
||
ctx = OpenSSL::SSL::SSLContext.new("SSLv3")
|
||
ctx = OpenSSL::SSL::SSLContext.new
|
||
ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT
|
||
ctx.session_new_cb = lambda { |ary|
|
||
... | ... | |
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(:SSLv23_server))
|
||
ssl.sync_close = true
|
||
ssl.session = last_client_session if last_client_session
|
||
ssl.connect
|