mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-26 07:33:47 +00:00
Signal errors if EPA can't verify data
* lisp/epa.el (epa-verify-region): Signal an error if the region couldn't be verified (bug#14720). (epa-verify-file): Say that the file couldn't be verified instead of just "...done".
This commit is contained in:
parent
abdc82c08f
commit
ce49efd4c6
@ -701,7 +701,8 @@ If you do not specify PLAIN-FILE, this functions prompts for the value to use."
|
||||
(message "Verifying %s...done" (file-name-nondirectory file))
|
||||
(if (epg-context-result-for context 'verify)
|
||||
(epa-display-info (epg-verify-result-to-string
|
||||
(epg-context-result-for context 'verify))))))
|
||||
(epg-context-result-for context 'verify)))
|
||||
(message "Verification not successful"))))
|
||||
|
||||
(defun epa--read-signature-type ()
|
||||
(let (type c)
|
||||
@ -945,6 +946,8 @@ For example:
|
||||
(or coding-system-for-read
|
||||
(get-text-property start 'epa-coding-system-used)
|
||||
'undecided)))
|
||||
(unless (epg-context-result-for context 'verify)
|
||||
(error "Unable to verify region"))
|
||||
(if (or (eq epa-replace-original-text t)
|
||||
(and epa-replace-original-text
|
||||
(y-or-n-p "Replace the original text? ")))
|
||||
|
Loading…
Reference in New Issue
Block a user