From ce49efd4c602d5bed7c5ef03237b08df09809591 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 23 Sep 2019 14:09:48 +0200 Subject: [PATCH] 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". --- lisp/epa.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/epa.el b/lisp/epa.el index b55a55fbb9a..59433489603 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -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? "))) -- 2.39.2