mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-02 11:21:42 +00:00
plstore.el: Don't cache wrong passphrase
* plstore.el (plstore--decrypt): Clear entry in `plstore-passphrase-alist' if decryption failed (bug#20030).
This commit is contained in:
parent
ce88920edb
commit
2e4b0c98a7
@ -1,3 +1,8 @@
|
||||
2015-03-31 Daiki Ueno <ueno@gnu.org>
|
||||
|
||||
* plstore.el (plstore--decrypt): Clear entry in
|
||||
`plstore-passphrase-alist' if decryption failed (bug#20030).
|
||||
|
||||
2015-03-28 Adam Sjøgren <asjo@koldfront.dk>
|
||||
|
||||
* gnus-sum.el (gnus-summary-make-menu-bar): Add "Display HTML images"
|
||||
|
@ -270,9 +270,16 @@ symmetric encryption will be used.")
|
||||
context
|
||||
(cons #'plstore-progress-callback-function
|
||||
(format "Decrypting %s" (plstore-get-file plstore))))
|
||||
(setq plain
|
||||
(epg-decrypt-string context
|
||||
(plstore--get-encrypted-data plstore)))
|
||||
(condition-case error
|
||||
(setq plain
|
||||
(epg-decrypt-string context
|
||||
(plstore--get-encrypted-data plstore)))
|
||||
(error
|
||||
(let ((entry (assoc (plstore-get-file plstore)
|
||||
plstore-passphrase-alist)))
|
||||
(if entry
|
||||
(setcdr entry nil)))
|
||||
(signal (car error) (cdr error))))
|
||||
(plstore--set-secret-alist plstore (car (read-from-string plain)))
|
||||
(plstore--merge-secret plstore)
|
||||
(plstore--set-encrypted-data plstore nil))))
|
||||
|
Loading…
Reference in New Issue
Block a user