From fb7a337e97db438d11dd48a33e9fd75483eefed8 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Sun, 14 Nov 2010 21:46:08 +0000 Subject: * etc/openssl/ossl_ssl.c (ossl_ssl_get_cert): raise exception if pointer is invalid. Thanks Ippei Obayashi! [ruby-dev:42573] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/openssl/test_ssl.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/openssl') diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb index 73c35c0749..2d56a7058c 100644 --- a/test/openssl/test_ssl.rb +++ b/test/openssl/test_ssl.rb @@ -160,6 +160,10 @@ class OpenSSL::TestSSL < Test::Unit::TestCase assert_equal(ctx.setup, nil) end + def test_not_started_session + OpenSSL::SSL::SSLSocket.new(STDIN).cert + end + def test_ssl_read_nonblock start_server(PORT, OpenSSL::SSL::VERIFY_NONE, true) { |server, port| sock = TCPSocket.new("127.0.0.1", port) -- cgit v1.2.3