diff options
author | technorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-08 15:02:04 +0000 |
---|---|---|
committer | technorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-08 15:02:04 +0000 |
commit | 18342ff8e00ebe27584786276a68d99767a2c38d (patch) | |
tree | 9e7f4f09dace24fe7af05763aa9dbb6ae67550b8 /ext/openssl/lib/openssl/ssl.rb | |
parent | f5be4ddc8d2d76f8d3543c5ecfd852199b20b7d2 (diff) |
import OpenSSL from trunk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/lib/openssl/ssl.rb')
-rw-r--r-- | ext/openssl/lib/openssl/ssl.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/openssl/lib/openssl/ssl.rb b/ext/openssl/lib/openssl/ssl.rb index ef7415f478..ab38aa2ab1 100644 --- a/ext/openssl/lib/openssl/ssl.rb +++ b/ext/openssl/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 |