commit | 559e062ce8bfd6a39925294620b50906ca2a6f95 | [log] [tgz] |
---|---|---|
author | Nicola Murino <nicola.murino@gmail.com> | Sun Aug 31 20:07:32 2025 +0200 |
committer | Nicola Murino <nicola.murino@gmail.com> | Tue Sep 09 02:56:19 2025 -0700 |
tree | 92fcab091e6f45d6205893caf5bd3b131fa39125 | |
parent | 5307a0ce6db8057c8d7c4378dc4bd715b4985ba1 [diff] |
ssh/agent: return an error for unexpected message types Previously, receiving an unexpected message type in response to a key listing or a signing request could cause a panic due to a failed type assertion. This change adds a default case to the type switch in order to detect and explicitly handle unknown or invalid message types, returning a descriptive error instead of crashing. Fixes golang/go#75178 Change-Id: Icbc3432adc79fe3c56b1ff23c6724d7a6f710f3a Reviewed-on: https://go-review.googlesource.com/c/crypto/+/700295 Reviewed-by: Roland Shoemaker <roland@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Jakub Ciolek <jakub@ciolek.dev>
This repository holds supplementary Go cryptography packages.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/crypto.
The main issue tracker for the crypto repository is located at https://go.dev/issues. Prefix your issue with “x/crypto:” in the subject line, so it is easy to find.
Note that contributions to the cryptography package receive additional scrutiny due to their sensitive nature. Patches may take longer than normal to receive feedback.