From: ueno Date: Mon, 17 Apr 2006 02:13:42 +0000 (+0000) Subject: * epa.el (epa-verify-file): Display verify result. X-Git-Tag: epgsm-branchpoint~64 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d861bb898f66f6e8709091a1a1dd9c4a0968a5df;p=elisp%2Fepg.git * epa.el (epa-verify-file): Display verify result. --- diff --git a/ChangeLog b/ChangeLog index 4135c7f..9764d16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2006-04-17 Daiki Ueno + * epa.el (epa-verify-file): Display verify result. + * epg.el (epg-invalid-recipients-alist): New variable. (epg-status-INV_RECP): New function. (epg-status-NO_RECP): New function. diff --git a/epa-dired.el b/epa-dired.el index 784d636..74c3cff 100644 --- a/epa-dired.el +++ b/epa-dired.el @@ -45,7 +45,8 @@ (let ((file-list (dired-get-marked-files))) (while file-list (epa-decrypt-file (car file-list)) - (setq file-list (cdr file-list))))) + (setq file-list (cdr file-list))) + (revert-buffer))) (defun epa-dired-do-verify () "Verify marked files." @@ -53,7 +54,8 @@ (let ((file-list (dired-get-marked-files))) (while file-list (epa-verify-file (car file-list)) - (setq file-list (cdr file-list))))) + (setq file-list (cdr file-list))) + (revert-buffer))) (defun epa-dired-do-sign (&optional detached) "Sign marked files." @@ -61,7 +63,8 @@ (let ((file-list (dired-get-marked-files))) (while file-list (epa-sign-file (expand-file-name (car file-list)) detached) - (setq file-list (cdr file-list))))) + (setq file-list (cdr file-list))) + (revert-buffer))) (defun epa-dired-do-encrypt () "Encrypt marked files." @@ -75,7 +78,8 @@ (car (epg-key-sub-key-list key)))) (epa-select-keys "Select recipents for encryption. If no one is selected, symmetric encryption will be performed. "))) - (setq file-list (cdr file-list))))) + (setq file-list (cdr file-list))) + (revert-buffer))) (provide 'epa-dired) diff --git a/epa.el b/epa.el index c3c8aed..100e02d 100644 --- a/epa.el +++ b/epa.el @@ -265,7 +265,8 @@ (goto-char (point-min)) (let (keys key) (while (re-search-forward "^\\*" nil t) - (if (setq key (get-text-property (match-beginning 0) 'epa-key)) + (if (setq key (get-text-property (match-beginning 0) + 'epa-key)) (setq keys (cons key keys)))) (nreverse keys)))) (if (get-buffer-window epa-keys-buffer) @@ -371,9 +372,22 @@ (interactive "fFile: ") (let* ((context (epg-make-context)) (plain (if (equal (file-name-extension file) "sig") - (file-name-sans-extension file)))) + (file-name-sans-extension file))) + signature) (message "Verifying %s..." (file-name-nondirectory file)) (epg-verify-file context file plain) + (setq signature (reverse (epg-context-result-for context 'verify))) + (with-output-to-temp-buffer "*epa-verify-file*" + (set-buffer standard-output) + (while signature + (insert (format "%s: %s %s %s\n" + (epg-signature-status (car signature)) + (epg-signature-key-id (car signature)) + (epg-signature-user-id (car signature)) + (epg-signature-validity (car signature)))) + (setq signature (cdr signature)))) + (shrink-window-if-larger-than-buffer + (get-buffer-window "*epa-verify-file*")) (message "Verifying %s...done" (file-name-nondirectory file)))) (defun epa-sign-file (file detached)