Skip to content

Reintegrate upstream 0.6: reset main to wiktor-k/ssh-agent-lib and re-apply the QueryResponse wire-format fix (ad23a6d) #3

@friedenberg

Description

@friedenberg

Goal

amarbel-llc/ssh-agent-lib main has diverged from upstream wiktor-k/ssh-agent-lib main: 11 ahead / 26 behind (status: diverged).

Of the 11 "ahead" commits, 10 are upstream's own cert-support/rename lineage (Add CertKeyData, Rename CertKeyData -> PublicCredential, Rename Credential -> PrivateCredential, Move PrivateCredential to credential module, etc.) — upstream has since merged that work (PR wiktor-k#101) and shipped it in 0.6, so those commits are now redundant on our fork. The only fork-unique commit is ad23a6d ("Fix QueryResponse wire format to match IETF spec and OpenSSH").

Bring the fork current with upstream 0.6 while preserving that one fix.

Plan

  1. Reset main to wiktor-k/ssh-agent-lib main (currently the 0.6 release line, tip 59707d1 "release version 0.6"). This is a history reset / force-push of our main.
  2. Cherry-pick / re-apply ad23a6d on top.

Feasibility (verified against upstream main)

  • ad23a6d is a single-file, self-contained change: src/proto/extension/message.rs (+63/-4) — replaces QueryResponse's Vec<String> Encode/Decode (which adds/reads an outer u32 byte-count prefix the SSH agent protocol does not use for extension query responses) with flat per-string encode/decode, plus compliance tests asserting byte-identical output to OpenSSH process_ext_query.
  • That file exists at the same path on 0.6 and still carries the buggy encoding (self.extensions.encode(writer) / Vec::<String>::decode), so the fix is still required.
  • The QueryResponse impl block and the test module's insertion point (after the round_trip helper, before parse_bind) on 0.6 match ad23a6d's patch context, so the cherry-pick should apply cleanly — at most a trivial context nudge for the added use in the test module.

Downstream impact (ssh-agent-mux)

  • ssh-agent-mux pins this fork at branch=main (its Cargo.lock is currently ad23a6d). After reintegration, bump ssh-agent-mux's Cargo.lock to the new tip and confirm it builds + passes just (cargo + bats). The 26 upstream commits include 0.6 dependency updates and the cert renames; ssh-agent-mux/src/lib.rs already imports PrivateCredential, so it is partly aligned, but the full build/tests must be re-verified.
  • Relates to ssh-agent-mux#10 (aggregated query drops upstream ecdh@joyent.com): the wrapped-output half (hypothesis b) is exactly this ad23a6d fix; the code-6 SSH_AGENT_SUCCESS handling half (hypothesis a) is a separate change in ssh-agent-mux, not this repo.

Reported by Clown :clown:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions