2006-05-26 Daiki Ueno <ueno@unixuser.org>
+ * 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.
(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))))