diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-14 02:58:49 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-14 02:58:49 +0000 |
commit | c35c4baa58ee6b5e041a0657aa780d84694417cd (patch) | |
tree | 868d408485ff02c78f7a156b565d1ff50ba70293 /test | |
parent | 7b3fee72513333dfe86c2ae7cf62bd3245b51694 (diff) | |
download | ruby-c35c4baa58ee6b5e041a0657aa780d84694417cd.tar.gz |
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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/openssl/test_ssl_session.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/openssl/test_ssl_session.rb b/test/openssl/test_ssl_session.rb index 0c384c731a..5ce93b52a9 100644 --- a/test/openssl/test_ssl_session.rb +++ b/test/openssl/test_ssl_session.rb @@ -312,6 +312,9 @@ __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| @@ -355,7 +358,7 @@ __EOS__ 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(method)) ssl.sync_close = true ssl.session = last_client_session if last_client_session ssl.connect |