2006-04-17 Daiki Ueno <ueno@unixuser.org>
+ * epg.el (epg-invalid-recipients-alist): New variable.
+ (epg-status-INV_RECP): New function.
+ (epg-status-NO_RECP): New function.
+
* epa.el (epa-keys-mode-map): Bind epa-decrypt-file,
epa-verify-file, epa-sign-file, and epa-encrypt-file.
(epa-decrypt-file): New function imported from epa-dired.el.
(2 . "ZLIB")
(3 . "BZIP2")))
+(defconst epg-invalid-recipients-alist
+ '((0 . "No specific reason given")
+ (1 . "Not Found")
+ (2 . "Ambigious specification")
+ (3 . "Wrong key usage")
+ (4 . "Key revoked")
+ (5 . "Key expired")
+ (6 . "No CRL known")
+ (7 . "CRL too old")
+ (8 . "Policy mismatch")
+ (9 . "Not a secret key")
+ (10 . "Key not trusted")))
+
(defvar epg-key-validity-alist
'((?o . unknown)
(?i . invalid)
(cons 'bad-armor
(epg-context-result-for epg-context 'error))))
+(defun epg-status-INV_RECP (process string)
+ (if (string-match "\\`\\([0-9]+\\) \\(.*\\)" string)
+ (epg-context-set-result-for
+ epg-context 'error
+ (cons (cons 'invalid-recipient
+ (string-to-number (match-string 1 string)))
+ (epg-context-result-for epg-context 'error)))))
+
+(defun epg-status-NO_RECP (process string)
+ (epg-context-set-result-for
+ epg-context 'error
+ (cons 'no-recipients
+ (epg-context-result-for epg-context 'error))))
+
(defun epg-passphrase-callback-function (key-id handback)
(read-passwd
(if (eq key-id 'SYM)