diff options
| author | edef <edef@edef.eu> | 2022-06-14 17:35:57 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-08-26 18:10:53 +0000 |
| commit | bd7e27e6170dc8db5a8588e1ac1e971eae90710f (patch) | |
| tree | b59932f50108509b372ec7eab1bb76ba9bcabbcf | |
| parent | 5757bc0c5503e9832a646fcf49ea46445f253091 (diff) | |
| download | go-x-crypto-bd7e27e6170dc8db5a8588e1ac1e971eae90710f.tar.xz | |
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>
| -rw-r--r-- | ssh/agent/client.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ssh/agent/client.go b/ssh/agent/client.go index 3c4d18a..eb6bc71 100644 --- a/ssh/agent/client.go +++ b/ssh/agent/client.go @@ -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 |
