From: ueno Date: Thu, 26 Apr 2007 06:28:57 +0000 (+0000) Subject: (epg--prompt-GET_BOOL-untrusted_key.override): Lookup X-Git-Tag: epg-0_0_12~5 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=6d04b431e4e13da41c28fb4da31b4686f4ecff96;p=elisp%2Fepg.git (epg--prompt-GET_BOOL-untrusted_key.override): Lookup user-id from epg-user-id-alist. --- diff --git a/ChangeLog b/ChangeLog index fbf959a..cf248cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-04-26 Daiki Ueno + + * epg.el (epg--prompt-GET_BOOL-untrusted_key.override): Lookup + user-id from epg-user-id-alist. + 2007-04-22 Daiki Ueno * epa-file.el (epa-file-select-keys): New command. diff --git a/epg.el b/epg.el index 160f911..7762285 100644 --- a/epg.el +++ b/epg.el @@ -1291,9 +1291,14 @@ This function is for internal use only." (y-or-n-p (if entry (cdr entry) (concat string "? "))))) (defun epg--prompt-GET_BOOL-untrusted_key.override (context string) - (y-or-n-p (if (equal (car epg-last-status) "USERID_HINT") - (format "Untrusted key %s. Use anyway? " - (cdr epg-last-status)) + (y-or-n-p (if (and (equal (car epg-last-status) "USERID_HINT") + (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)) + (let* ((key-id (match-string 1 string)) + (user-id (match-string 2 string)) + (entry (assoc key-id epg-user-id-alist))) + (if entry + (setq user-id (cdr entry))) + (format "Untrusted key %s %s. Use anyway? " key-id user-id)) "Use untrusted key anyway? "))) (defun epg--status-GET_BOOL (context string)