+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"
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))))