(kill-buffer (process-buffer (epg-context-process context))))
(epg-context-set-process context nil)
(if (file-exists-p (epg-context-output-file context))
- (delete-file (epg-context-output-file context)))
- (aset context 9 nil))
+ (delete-file (epg-context-output-file context))))
(defun epg-status-USERID_HINT (process string)
(if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)
`epg-reset' to clear a temporaly output file.
If you are unsure, use synchronous version of this function
`epg-decrypt-string' instead."
+ (epg-context-set-result context nil)
(epg-context-set-output-file context (epg-make-temp-file "epg-output"))
(epg-start context
(list "--decrypt" input-file))
`epg-reset' to clear a temporaly output file.
If you are unsure, use synchronous version of this function
`epg-verify-string' instead."
+ (epg-context-set-result context nil)
(epg-context-set-output-file context (epg-make-temp-file "epg-output"))
(if string
;; Detached signature.
(process-send-string (epg-context-process context) signature))))
;;;###autoload
+(defun epg-verify-file (context input-file &optional string)
+ "Verify INPUT-FILE.
+
+For a detached signature, both INPUT-FILE and STRING should be string.
+For a normal or a clear text signature, STRING should be nil."
+ (unwind-protect
+ (progn
+ (epg-start-verify context input-file string)
+ (epg-wait-for-completion context)
+ (epg-context-result-for context 'verify))
+ (epg-reset context)))
+
+;;;###autoload
(defun epg-verify-string (context signature &optional string)
"Verify SIGNATURE.
(delete-file input-file)))))
;;;###autoload
-(defun epg-verify-file (context input-file &optional string)
- "Verify INPUT-FILE.
-
-For a detached signature, both INPUT-FILE and STRING should be string.
-For a normal or a clear text signature, STRING should be nil."
- (unwind-protect
- (progn
- (epg-start-verify context input-file string)
- (epg-wait-for-completion context)
- (epg-context-result-for context 'verify))
- (epg-reset context)))
-
-;;;###autoload
(defun epg-start-sign (context string &optional mode)
"Initiate a sign operation on STRING.
`epg-reset' to clear a temporaly output file.
If you are unsure, use synchronous version of this function
`epg-sign-string' instead."
+ (epg-context-set-result context nil)
(epg-context-set-output-file context (epg-make-temp-file "epg-output"))
(epg-start context
(append (list (if (eq mode 'clearsign)
`epg-reset' to clear a temporaly output file.
If you are unsure, use synchronous version of this function
`epg-encrypt-string' instead."
+ (epg-context-set-result context nil)
(epg-context-set-output-file context (epg-make-temp-file "epg-output"))
(epg-start context
(append (if always-trust '("--always-trust"))
`epg-reset' to clear a temporaly output file.
If you are unsure, use synchronous version of this function
`epg-export-keys' instead."
+ (epg-context-set-result context nil)
(epg-context-set-output-file context (epg-make-temp-file "epg-output"))
(epg-start context (list "--export" pattern)))
`epg-reset' to clear a temporaly output file.
If you are unsure, use synchronous version of this function
`epg-import-keys' instead."
+ (epg-context-set-result context nil)
(epg-context-set-output-file context (epg-make-temp-file "epg-output"))
(epg-start context (list "--import"))
(if (eq (process-status (epg-context-process context)) 'run)