summaryrefslogtreecommitdiffstats
path: root/lib/openssl/ssl.rb
diff options
context:
space:
mode:
authortechnorama <technorama@ruby-lang.org>2007-04-02 22:10:12 +0000
committertechnorama <technorama@ruby-lang.org>2007-04-02 22:10:12 +0000
commitd13a7744b2e5159e3f9555d9cefda1c9c41884fe (patch)
tree1ab7d7bc2b7a5cbd3919a9b413703e8bfb8f43cf /lib/openssl/ssl.rb
parent99fc5b93e48e1bf1652435a18a4ec3394710a801 (diff)
downloadruby-openssl-history-d13a7744b2e5159e3f9555d9cefda1c9c41884fe.tar.gz
* ext/openssl/ossl_{ssl.[ch],ssl_session.c}},
ext/openssl/lib/openssl/lib/openssl/ssl.rb: New SSL::Session class. Add session cb's, getter/setters, config, and statistics methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/openssl/ssl.rb')
-rw-r--r--lib/openssl/ssl.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/openssl/ssl.rb b/lib/openssl/ssl.rb
index ef7415f..ab38aa2 100644
--- a/lib/openssl/ssl.rb
+++ b/lib/openssl/ssl.rb
@@ -90,6 +90,12 @@ module OpenSSL
end
raise SSLError, "hostname not match"
end
+
+ def session
+ SSL::Session.new(self)
+ rescue SSL::Session::SessionError
+ nil
+ end
end
class SSLServer