Skip to content

Commit

Permalink
ssh/agent: match OpenSSH extensionAgentMsg, not IETF draft
Browse files Browse the repository at this point in the history
The OpenSSH wire format just suffixes the raw extension body,
without a nested string.

Fixes golang/go#51689

Change-Id: Ic224cedb934ba0563abca9a45a6be1c67769ed6d
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/412154
Reviewed-by: Roland Shoemaker <roland@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Run-TryBot: hopehook <hopehook@qq.com>
Reviewed-by: Daniel Lublin <daniel@lublin.se>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
  • Loading branch information
edef1c authored and gopherbot committed Aug 26, 2022
1 parent 37580fb commit fc03327
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ssh/agent/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ var ErrExtensionUnsupported = errors.New("agent: extension unsupported")

type extensionAgentMsg struct {
ExtensionType string `sshtype:"27"`
Contents []byte
// NOTE: this matches OpenSSH's PROTOCOL.agent, not the IETF draft [PROTOCOL.agent],
// so that it matches what OpenSSH actually implements in the wild.
Contents []byte `ssh:"rest"`
}

// Key represents a protocol 2 public key as defined in
Expand Down

0 comments on commit fc03327

Please sign in to comment.