(defun epg-context-set-passphrase-callback (context passphrase-callback
&optional handback)
"Set the function used to query passphrase.
-If optional argument HANDBACK is specified, it is passed to CALLBACK."
+If optional argument HANDBACK is specified, it is passed to PASSPHRASE-CALLBACK."
(unless (eq (car-safe context) 'epg-context)
(signal 'wrong-type-argument (list 'epg-context-p context)))
(aset (cdr context) 7 (if handback
(defun epg-context-set-progress-callback (context progress-callback
&optional handback)
"Set the function which handles progress update.
-If optional argument HANDBACK is specified, it is passed to CALLBACK."
+If optional argument HANDBACK is specified, it is passed to PROGRESS-CALLBACK."
(unless (eq (car-safe context) 'epg-context)
(signal 'wrong-type-argument (list 'epg-context-p context)))
(aset (cdr context) 8 (if handback
(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 "\\`\\([^ ]+\\) \\(.*\\)"
+ (cdr epg-last-status)))
+ (let* ((key-id (match-string 1 (cdr epg-last-status)))
+ (user-id (match-string 2 (cdr epg-last-status)))
+ (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)
;;;###autoload
(defun epg-start-sign-keys (context keys &optional local)
- "Initiate an sign keys operation.
+ "Initiate a sign keys operation.
If you use this function, you will need to wait for the completion of
`epg-gpg-program' by using `epg-wait-for-completion' and call