cipher-algorithm digest-algorithm compress-algorithm
#'epg-passphrase-callback-function
nil
- nil nil nil nil nil nil nil)))
+ nil nil nil nil nil nil)))
(defun epg-context-protocol (context)
"Return the protocol used within CONTEXT."
(signal 'wrong-type-argument (list 'epg-context-p context)))
(aref (cdr context) 14))
-(defun epg-context-edit-key-callback (context)
- "Return the function which handles input/output from the edit-key operation.
-This function is for internal use only."
- (unless (eq (car-safe context) 'epg-context)
- (signal 'wrong-type-argument (list 'epg-context-p context)))
- (aref (cdr context) 15))
-
(defun epg-context-set-protocol (context protocol)
"Set the protocol used within CONTEXT."
(unless (eq (car-safe context) 'epg-context)
(signal 'wrong-type-argument (list 'epg-context-p context)))
(aset (cdr context) 14 operation))
-(defun epg-context-set-edit-key-callback (context callback &optional handback)
- "Set the function which handles input/output from the edit-key operation.
-If optional argument HANDBACK is specified, it is passed to CALLBACK.
-This function is for internal use only."
- (unless (eq (car-safe context) 'epg-context)
- (signal 'wrong-type-argument (list 'epg-context-p context)))
- (aset (cdr context) 15 (if handback
- (cons callback handback)
- callback)))
-
(defun epg-make-signature (status &optional key-id)
"Return a signature object."
(cons 'epg-signature (vector status key-id nil nil nil nil nil nil nil nil
(if (looking-at "\\[GNUPG:] \\([A-Z_]+\\) ?\\(.*\\)")
(let* ((status (match-string 1))
(string (match-string 2))
- (symbol (if (eq (epg-context-operation epg-context)
- 'edit-key)
- #'epg--edit-key-callback
- (intern-soft (concat "epg--status-"
- status)))))
+ (symbol (intern-soft (concat "epg--status-"
+ status))))
(if (member status epg-pending-status-list)
(setq epg-pending-status-list nil))
(if (and symbol
(defalias 'epg--decode-coding-string 'decode-coding-string)
(defalias 'epg--decode-coding-string 'identity)))
-(defun epg--edit-key-callback (context string)
- (let ((callback (epg-context-edit-key-callback context)))
- (funcall (car callback) (cdr callback))))
-
(defun epg--status-USERID_HINT (context string)
(if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)
(let* ((key-id (match-string 1 string))
(epg-reset context)))
;;;###autoload
-(defun epg-start-edit-key (context key callback &optional handback)
- "Initiate an edit key 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
-`epg-reset' to clear a temporaly output file.
-If you are unsure, use synchronous version of this function
-`epg-sign-keys' instead."
- (epg-context-set-operation context 'edit-key)
- (epg-context-set-result context nil)
- (epg-context-set-edit-key-callback context callback handback)
- (epg--start context (list "--edit-key"
- (epg-sub-key-id (car epg-key-sub-key-list key)))))
-
-;;;###autoload
-(defun epg-edit-key (context key callback &optional handback)
- "Process the KEY interactively, using the edit CALLBACK with the HANDBACK.
-The CALLBACK is invoked for every status and command request from
-the crypto engine."
- (unwind-protect
- (progn
- (epg-start-edit-key context key callback handback)
- (epg-wait-for-completion context)
- (if (epg-context-result-for context 'error)
- (error "Edit key failed: %S"
- (epg-context-result-for context 'error))))
- (epg-reset context)))
-
-;;;###autoload
(defun epg-start-sign-keys (context keys &optional local)
"Initiate a sign keys operation.