;;;###autoload
(defun epg-start-decrypt (context cipher)
"Initiate a decrypt operation on CIPHER.
-CIPHER is a data object.
+CIPHER must be a file data object.
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
(error "Not a file"))
(epg-context-set-operation context 'decrypt)
(epg-context-set-result context nil)
- (epg--start context (list "--decrypt" (epg-data-file cipher)))
+ (epg--start context (list "--decrypt" "--" (epg-data-file cipher)))
;; `gpgsm' does not read passphrase from stdin, so waiting is not needed.
(unless (eq (epg-context-protocol context) 'CMS)
(epg-wait-for-status context '("BEGIN_DECRYPTION"))))
(if signed-text
;; Detached signature.
(if (epg-data-file signed-text)
- (epg--start context (list "--verify" (epg-data-file signature)
+ (epg--start context (list "--verify" "--" (epg-data-file signature)
(epg-data-file signed-text)))
(epg--start context (list "--verify" (epg-data-file signature) "-"))
(if (eq (process-status (epg-context-process context)) 'run)
(process-send-eof (epg-context-process context))))
;; Normal (or cleartext) signature.
(if (epg-data-file signature)
- (epg--start context (list "--verify" (epg-data-file signature)))
+ (epg--start context (list "--verify" "--" (epg-data-file signature)))
(epg--start context (list "--verify"))
(if (eq (process-status (epg-context-process context)) 'run)
(process-send-string (epg-context-process context)
(car (epg-key-sub-key-list signer)))))
(epg-context-signers context)))
(if (epg-data-file plain)
- (list (epg-data-file plain)))))
+ (list "--" (epg-data-file plain)))))
;; `gpgsm' does not read passphrase from stdin, so waiting is not needed.
(unless (eq (epg-context-protocol context) 'CMS)
(epg-wait-for-status context '("BEGIN_SIGNING")))
(car (epg-key-sub-key-list recipient)))))
recipients))
(if (epg-data-file plain)
- (list (epg-data-file plain)))))
+ (list "--" (epg-data-file plain)))))
;; `gpgsm' does not read passphrase from stdin, so waiting is not needed.
(unless (eq (epg-context-protocol context) 'CMS)
(if sign
(epg-context-set-operation context 'import-keys)
(epg-context-set-result context nil)
(epg--start context (if (epg-data-file keys)
- (list "--import" (epg-data-file keys))
+ (list "--import" "--" (epg-data-file keys))
(list "--import")))
(when (epg-data-string keys)
(if (eq (process-status (epg-context-process context)) 'run)
(epg-context-set-operation context 'generate-key)
(epg-context-set-result context nil)
(if (epg-data-file parameters)
- (epg--start context (list "--batch" "--genkey"
+ (epg--start context (list "--batch" "--genkey" "--"
(epg-data-file parameters)))
(epg--start context '("--batch" "--genkey"))
(if (eq (process-status (epg-context-process context)) 'run)