class OpenSSL::SSL::SSLSocket

def session

def session
  SSL::Session.new(self)
rescue SSL::Session::SessionError
  nil
end