aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-04-24 02:13:04 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-04-27 23:07:42 +0900
commiteea01eb6f4ec09b2ff6b9279626393757f24dccf (patch)
tree86e87f643febe53922ab6409110a42845b0fc455
parent42d3bc06bec665e96e6eda02d13036e524975a4b (diff)
downloadruby-eea01eb6f4ec09b2ff6b9279626393757f24dccf.tar.gz
test/openssl: fix test_server_session to dup the session
SSL_CTX_remove_session() sets not_resumable to the deleted session and OpenSSL 1.1.0 denies to resume a SSL_SESSION with not_resumable != 0.
-rw-r--r--test/openssl/test_ssl_session.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/openssl/test_ssl_session.rb b/test/openssl/test_ssl_session.rb
index 3294aa7..511129c 100644
--- a/test/openssl/test_ssl_session.rb
+++ b/test/openssl/test_ssl_session.rb
@@ -217,25 +217,25 @@ __EOS__
assert_equal(stats[:cache_misses], 0)
assert(ssl.session_reused?)
ctx.session_remove(session)
- saved_session = session
+ saved_session = session.to_der
when 2
assert_equal(stats[:cache_num], 1)
assert_equal(stats[:cache_hits], 1)
assert_equal(stats[:cache_misses], 1)
assert(!ssl.session_reused?)
- ctx.session_add(saved_session)
+ ctx.session_add(OpenSSL::SSL::Session.new(saved_session))
when 3
assert_equal(stats[:cache_num], 2)
assert_equal(stats[:cache_hits], 2)
assert_equal(stats[:cache_misses], 1)
assert(ssl.session_reused?)
- ctx.flush_sessions(Time.now + 5000)
+ ctx.flush_sessions(Time.now + 10000)
when 4
assert_equal(stats[:cache_num], 1)
assert_equal(stats[:cache_hits], 2)
assert_equal(stats[:cache_misses], 2)
assert(!ssl.session_reused?)
- ctx.session_add(saved_session)
+ ctx.session_add(OpenSSL::SSL::Session.new(saved_session))
end
connections += 1