# File lib/net/ssh/authentication/agent/socket.rb, line 88 88: def identities 89: type, body = send_and_wait(SSH2_AGENT_REQUEST_IDENTITIES) 90: raise AgentError, "could not get identity count" if agent_failed(type) 91: raise AgentError, "bad authentication reply: #{type}" if type != SSH2_AGENT_IDENTITIES_ANSWER 92: 93: identities = [] 94: body.read_long.times do 95: key = Buffer.new(body.read_string).read_key 96: key.extend(Comment) 97: key.comment = body.read_string 98: identities.push key 99: end 100: 101: return identities 102: end