When the extension() method is called on a client object, to whether a specific extension is supported the method either returns a success value or Err(ProtoError::UnexpectedResponse.into()).
See
|
match self.handle(Request::Extension(extension)).await? { |
This prevents a client from distinguishing between an actual protocol error and an SSH_AGENT_FAILURE response by an agent to indicate no support for a requested extension.
As SSH_AGENT_FAILURE is the correct response to signal not supporting optional features of the ssh agent protocol , the information should be passed to the client to allow distinguishing it from protocol error.
For example when ssh-agent-mux checks for support of protocol extension it ignores returned errors containing AgentError::Failure responses and logs errors for other returned results.
https://github.com/overhacked/ssh-agent-mux/blob/7b13c22b4ef3aa1adbc2d32f7c545d7fde6e892d/src/lib.rs#L77
When the
extension()method is called on a client object, to whether a specific extension is supported the method either returns a success value orErr(ProtoError::UnexpectedResponse.into()).See
ssh-agent-lib/src/client.rs
Line 186 in 59707d1
This prevents a client from distinguishing between an actual protocol error and an
SSH_AGENT_FAILUREresponse by an agent to indicate no support for a requested extension.As
SSH_AGENT_FAILUREis the correct response to signal not supporting optional features of the ssh agent protocol , the information should be passed to the client to allow distinguishing it from protocol error.For example when ssh-agent-mux checks for support of protocol extension it ignores returned errors containing
AgentError::Failureresponses and logs errors for other returned results.https://github.com/overhacked/ssh-agent-mux/blob/7b13c22b4ef3aa1adbc2d32f7c545d7fde6e892d/src/lib.rs#L77