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 <[email protected]>
Run-TryBot: Filippo Valsorda <[email protected]>
Run-TryBot: hopehook <[email protected]>
Reviewed-by: Daniel Lublin <[email protected]>
Auto-Submit: Filippo Valsorda <[email protected]>
Reviewed-by: Filippo Valsorda <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: David Chase <[email protected]>
  • Loading branch information
edef1c authored and maisem committed Nov 15, 2022
1 parent 0f742a5 commit 5eee31f
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 5eee31f

Please sign in to comment.