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)
(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)
'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)
(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)
(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 user-id-string)
+ keys cert pointer pointer-1)
(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)))
- 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)))
(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)))