summaryrefslogtreecommitdiffstats
path: root/test/openssl
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-05 11:36:55 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-05 11:36:55 +0000
commit78b29b3b5930bdf7495cb34a5b3722121a045c29 (patch)
tree2192d15b312ca96e47487d8a92f865aebdf57965 /test/openssl
parent4e4865de0daa710f4ff39709e40b09f2aeabab09 (diff)
downloadruby-78b29b3b5930bdf7495cb34a5b3722121a045c29.tar.gz
ruby-78b29b3b5930bdf7495cb34a5b3722121a045c29.tar.xz
ruby-78b29b3b5930bdf7495cb34a5b3722121a045c29.zip
* ext/openssl/ossl_ssl_session.c (ossl_ssl_session_initialize):
Add a null check for ssl; submitted by akira yamada in [ruby-dev:34950]. * ext/openssl/ossl_ssl.c (Init_ossl_ssl): Define OP_NO_TICKET if SSL_OP_NO_TICKET is present; submitted by akira yamada in [ruby-dev:34944]. * test/openssl/test_ssl.rb (OpenSSL#test_server_session): Add a workaround for the case where OpenSSL is configured with --enable-tlsext; submitted by akira yamada in [ruby-dev:34944]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl')
-rw-r--r--test/openssl/test_ssl.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index fe7327604..50659f1b3 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -511,7 +511,12 @@ class OpenSSL::TestSSL < Test::Unit::TestCase
start_server(PORT, OpenSSL::SSL::VERIFY_NONE, true, :ctx_proc => ctx_proc, :server_proc => server_proc) do |server, port|
10.times do |i|
sock = TCPSocket.new("127.0.0.1", port)
- ssl = OpenSSL::SSL::SSLSocket.new(sock)
+ ctx = OpenSSL::SSL::SSLContext.new
+ if defined?(OpenSSL::SSL::OP_NO_TICKET)
+ # disable RFC4507 support
+ ctx.options = OpenSSL::SSL::OP_NO_TICKET
+ end
+ ssl = OpenSSL::SSL::SSLSocket.new(sock, ctx)
ssl.sync_close = true
ssl.session = first_session if first_session
ssl.connect