* epg.el (epg--start): Don't specify --use-agent if the protocol
is CMS; set coding-system-for-read to binary.
(epg--status-*SIG): Decode user-id.
+ (epg--list-keys-1): Set coding-system-for-read to binary.1
+ (epg-list-keys): Decode user-id.
2007-02-02 Daiki Ueno <ueno@unixuser.org>
(unless (eq (epg-context-protocol context) 'CMS)
'("--fixed-list-mode"))
(if name (list name))))
+ (coding-system-for-read 'binary)
keys string field index)
(with-temp-buffer
(apply #'call-process
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)
+ keys cert pointer pointer-1 user-id-string)
(while lines
(cond
((member (aref (car lines) 0) '("pub" "sec" "crt" "crs"))
(cons (epg--make-sub-key-1 (car lines))
(epg-key-sub-key-list (car keys)))))
((equal (aref (car lines) 0) "uid")
+ (setq user-id-string (if cert
+ (condition-case nil
+ (epg-dn-from-string (aref (car lines) 9))
+ (error (aref (car lines) 9)))
+ (aref (car lines) 9)))
+ (condition-case nil
+ (setq user-id-string (epg--decode-coding-string user-id-string
+ 'utf-8))
+ (error))
(epg-key-set-user-id-list
(car keys)
(cons (epg-make-user-id
(if (aref (car lines) 1)
(cdr (assq (string-to-char (aref (car lines) 1))
epg-key-validity-alist)))
- (if cert
- (condition-case nil
- (epg-dn-from-string (aref (car lines) 9))
- (error (aref (car lines) 9)))
- (aref (car lines) 9)))
+ user-id-string)
(epg-key-user-id-list (car keys)))))
((equal (aref (car lines) 0) "fpr")
(epg-sub-key-set-fingerprint (car (epg-key-sub-key-list (car keys)))