-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
golang.org/x/crypto/openssh: don't loop forever after a bad password.
SymmetricKeyEncrypted cached the results of decryption so, if a bad password was given, ReadMessage would prompt forever because a later, correct password wouldn't override the cached decryption. The SymmetricKeyEncrypted object can't know whether a given passphrase is correct so it should never have been a mutable object in the first place. This change makes it so that it doesn't cache anything. Fixes #9315 Change-Id: Ic2b75f7f60a575e2182ac7e5c5d4198597c5d0a2 Reviewed-on: https://go-review.googlesource.com/14038 Reviewed-by: Andrew Gerrand <[email protected]> Reviewed-by: Adam Langley <[email protected]>
- Loading branch information
Showing
4 changed files
with
48 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters