# File lib/net/ssh/authentication/agent/socket.rb, line 74
74:     def negotiate!
75:       # determine what type of agent we're communicating with
76:       type, body = send_and_wait(SSH2_AGENT_REQUEST_VERSION, :string, Transport::ServerVersion::PROTO_VERSION)
77: 
78:       if type == SSH2_AGENT_VERSION_RESPONSE
79:         raise NotImplementedError, "SSH2 agents are not yet supported"
80:       elsif type != SSH_AGENT_RSA_IDENTITIES_ANSWER1 && type != SSH_AGENT_RSA_IDENTITIES_ANSWER2
81:         raise AgentError, "unknown response from agent: #{type}, #{body.to_s.inspect}"
82:       end
83:     end