Skip to content

client extension method reports for unsupported extension generic error #108

@71rd

Description

@71rd

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions