diff options
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 |