Skip to content

Commit bd7e27e

Browse files
edef1cgopherbot
authored andcommittedAug 26, 2022
ssh/agent: match OpenSSH extensionAgentMsg, not IETF draft
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>
1 parent 5757bc0 commit bd7e27e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎ssh/agent/client.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,9 @@ var ErrExtensionUnsupported = errors.New("agent: extension unsupported")
226226

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

232234
// Key represents a protocol 2 public key as defined in

0 commit comments

Comments
 (0)