From: ueno Date: Thu, 8 Mar 2007 02:36:56 +0000 (+0000) Subject: * epg.el (epg--start): Make the process-buffer unibyte. X-Git-Tag: plaintext-branchpoint~10 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=0203719739be2984f7fdad74c7fd26bfb2cf73ed;p=elisp%2Fepg.git * epg.el (epg--start): Make the process-buffer unibyte. (epg--status-USERID_HINT): Decode user-id. (epg--status-IMPORTED): Decode user-id. --- diff --git a/ChangeLog b/ChangeLog index 172f898..40ac648 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-03-08 Daiki Ueno + + * epg.el (epg--start): Make the process-buffer unibyte. + (epg--status-USERID_HINT): Decode user-id. + (epg--status-IMPORTED): Decode user-id. + 2007-03-07 Daiki Ueno * epg.el (epg--start): Don't specify --use-agent if the protocol diff --git a/epg.el b/epg.el index 802400f..0b4d7ca 100644 --- a/epg.el +++ b/epg.el @@ -1095,6 +1095,8 @@ This function is for internal use only." epg-gpg-program) (mapconcat #'identity args " "))))) (with-current-buffer buffer + (if (fboundp 'set-buffer-multibyte) + (set-buffer-multibyte nil)) (make-local-variable 'epg-last-status) (setq epg-last-status nil) (make-local-variable 'epg-read-point) @@ -1196,6 +1198,11 @@ This function is for internal use only." (let* ((key-id (match-string 1 string)) (user-id (match-string 2 string)) (entry (assoc key-id epg-user-id-alist))) + (condition-case nil + (if (eq (epg-context-protocol context) 'CMS) + (setq user-id (epg-dn-from-string user-id)) + (setq user-id (epg--decode-coding-string user-id 'utf-8))) + (error)) (if entry (setcdr entry user-id) (setq epg-user-id-alist (cons (cons key-id user-id) @@ -1315,12 +1322,10 @@ This function is for internal use only." 'verify (cons (epg-make-signature status key-id) (epg-context-result-for context 'verify))) - (if (eq (epg-context-protocol context) 'CMS) - (condition-case nil - (setq user-id (epg-dn-from-string user-id)) - (error))) (condition-case nil - (setq user-id (epg--decode-coding-string user-id 'utf-8)) + (if (eq (epg-context-protocol context) 'CMS) + (setq user-id (epg-dn-from-string user-id)) + (setq user-id (epg--decode-coding-string user-id 'utf-8))) (error)) (if entry (setcdr entry user-id) @@ -1580,6 +1585,11 @@ This function is for internal use only." (let* ((key-id (match-string 1 string)) (user-id (match-string 2 string)) (entry (assoc key-id epg-user-id-alist))) + (condition-case nil + (if (eq (epg-context-protocol context) 'CMS) + (setq user-id (epg-dn-from-string user-id)) + (setq user-id (epg--decode-coding-string user-id 'utf-8))) + (error)) (if entry (setcdr entry user-id) (setq epg-user-id-alist (cons (cons key-id user-id) @@ -1704,7 +1714,7 @@ If MODE is t or 'secret, only secret keyring should be searched. Otherwise, only public keyring should be searched and the key signatures should be included." (let ((lines (epg--list-keys-1 context name mode)) - keys cert pointer pointer-1 user-id-string) + keys cert pointer pointer-1) (while lines (cond ((member (aref (car lines) 0) '("pub" "sec" "crt" "crs"))