mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-04 11:40:22 +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>
|
2015-03-28 Adam Sjøgren <asjo@koldfront.dk>
|
||||||
|
|
||||||
* gnus-sum.el (gnus-summary-make-menu-bar): Add "Display HTML images"
|
* gnus-sum.el (gnus-summary-make-menu-bar): Add "Display HTML images"
|
||||||
|
@ -270,9 +270,16 @@ symmetric encryption will be used.")
|
|||||||
context
|
context
|
||||||
(cons #'plstore-progress-callback-function
|
(cons #'plstore-progress-callback-function
|
||||||
(format "Decrypting %s" (plstore-get-file plstore))))
|
(format "Decrypting %s" (plstore-get-file plstore))))
|
||||||
(setq plain
|
(condition-case error
|
||||||
(epg-decrypt-string context
|
(setq plain
|
||||||
(plstore--get-encrypted-data plstore)))
|
(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--set-secret-alist plstore (car (read-from-string plain)))
|
||||||
(plstore--merge-secret plstore)
|
(plstore--merge-secret plstore)
|
||||||
(plstore--set-encrypted-data plstore nil))))
|
(plstore--set-encrypted-data plstore nil))))
|
||||||
|
Loading…
Reference in New Issue
Block a user