From: ueno Date: Fri, 26 May 2006 22:33:32 +0000 (+0000) Subject: * epg.el (epg--status-NO_PUBKEY): Replace the previous signature's X-Git-Tag: epg-0_0_2~8 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fb4afb07597d037f5e7c3ee7cdfb07704f1999a;p=elisp%2Fepg.git * epg.el (epg--status-NO_PUBKEY): Replace the previous signature's status from 'error to 'no-pubkey. (epg--status-ERRSIG): Just add 'error signature to the verify result. --- diff --git a/ChangeLog b/ChangeLog index 13e3c91..1d77d3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-05-26 Daiki Ueno + * epg.el (epg--status-NO_PUBKEY): Replace the previous signature's + status from 'error to 'no-pubkey. + (epg--status-ERRSIG): Just add 'error signature to the verify result. + * epa.el (epa-insert-keys): Renamed from epa-list-keys-1; don't disable inhibit-quit here; make text-properties nonsticky. (epa-popup-info-window): New user option. diff --git a/epg.el b/epg.el index e56d635..13156bc 100644 --- a/epg.el +++ b/epg.el @@ -1040,36 +1040,32 @@ This function is for internal use only." (epg--status-*SIG 'bad string)) (defun epg--status-NO_PUBKEY (process string) - (epg-context-set-result-for - epg-context - 'verify - (cons (epg-make-signature 'no-pubkey string) - (epg-context-result-for epg-context 'verify)))) + (let ((signature (car (epg-context-result-for epg-context 'verify)))) + (if (and signature + (eq (epg-signature-status signature) 'error)) + (epg-signature-set-status signature 'no-pubkey)))) (defun epg--status-ERRSIG (process string) - (let ((signatures (epg-context-result-for epg-context 'verify))) - (unless signatures - (setq signatures (list (epg-make-signature 'error))) - (epg-context-set-result-for epg-context 'verify signatures)) - (when (and (not (eq (epg-signature-status (car signatures)) 'good)) - (string-match "\\`\\([^ ]+\\) \\([0-9]+\\) \\([0-9]+\\) \ + (if (string-match "\\`\\([^ ]+\\) \\([0-9]+\\) \\([0-9]+\\) \ \\([0-9A-Fa-f][0-9A-Fa-f]\\) \\([^ ]+\\) \\([0-9]+\\)" - string)) - (epg-signature-set-key-id - (car signatures) - (match-string 1 string)) - (epg-signature-set-pubkey-algorithm - (car signatures) - (string-to-number (match-string 2 string))) - (epg-signature-set-digest-algorithm - (car signatures) - (string-to-number (match-string 3 string))) - (epg-signature-set-class - (car signatures) - (string-to-number (match-string 4 string) 16)) - (epg-signature-set-creation-time - (car signatures) - (match-string 5 string))))) + string) + (let ((signature (epg-make-signature 'error))) + (epg-context-set-result-for epg-context 'verify (list signature)) + (epg-signature-set-key-id + signature + (match-string 1 string)) + (epg-signature-set-pubkey-algorithm + signature + (string-to-number (match-string 2 string))) + (epg-signature-set-digest-algorithm + signature + (string-to-number (match-string 3 string))) + (epg-signature-set-class + signature + (string-to-number (match-string 4 string) 16)) + (epg-signature-set-creation-time + signature + (match-string 5 string))))) (defun epg--status-VALIDSIG (process string) (let ((signature (car (epg-context-result-for epg-context 'verify))))