diff options
| author | Lars Ingebrigtsen | 2019-09-23 14:09:48 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-09-23 14:09:48 +0200 |
| commit | ce49efd4c602d5bed7c5ef03237b08df09809591 (patch) | |
| tree | 3a3e422c20c4937a7d7c97d99d315db33523275a | |
| parent | abdc82c08fa57e1ba66b8c7efb44a7874ba221f7 (diff) | |
| download | emacs-ce49efd4c602d5bed7c5ef03237b08df09809591.tar.gz emacs-ce49efd4c602d5bed7c5ef03237b08df09809591.zip | |
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".
| -rw-r--r-- | lisp/epa.el | 5 |
1 files changed, 4 insertions, 1 deletions
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." | |||
| 701 | (message "Verifying %s...done" (file-name-nondirectory file)) | 701 | (message "Verifying %s...done" (file-name-nondirectory file)) |
| 702 | (if (epg-context-result-for context 'verify) | 702 | (if (epg-context-result-for context 'verify) |
| 703 | (epa-display-info (epg-verify-result-to-string | 703 | (epa-display-info (epg-verify-result-to-string |
| 704 | (epg-context-result-for context 'verify)))))) | 704 | (epg-context-result-for context 'verify))) |
| 705 | (message "Verification not successful")))) | ||
| 705 | 706 | ||
| 706 | (defun epa--read-signature-type () | 707 | (defun epa--read-signature-type () |
| 707 | (let (type c) | 708 | (let (type c) |
| @@ -945,6 +946,8 @@ For example: | |||
| 945 | (or coding-system-for-read | 946 | (or coding-system-for-read |
| 946 | (get-text-property start 'epa-coding-system-used) | 947 | (get-text-property start 'epa-coding-system-used) |
| 947 | 'undecided))) | 948 | 'undecided))) |
| 949 | (unless (epg-context-result-for context 'verify) | ||
| 950 | (error "Unable to verify region")) | ||
| 948 | (if (or (eq epa-replace-original-text t) | 951 | (if (or (eq epa-replace-original-text t) |
| 949 | (and epa-replace-original-text | 952 | (and epa-replace-original-text |
| 950 | (y-or-n-p "Replace the original text? "))) | 953 | (y-or-n-p "Replace the original text? "))) |