"Start `epg-gpg-program' in a subprocess with given ARGS."
(let* ((args (append (list "--no-tty"
"--status-fd" "1"
- "--command-fd" "0")
+ "--command-fd" "0"
+ "--yes")
(if (epg-context-armor context) '("--armor"))
(if (epg-context-textmode context) '("--textmode"))
(if (epg-context-output-file context)
(if (string-match "\\`\\([0-9]+\\) \\(.*\\)" string)
(epg-context-set-result-for
epg-context 'error
- (cons (cons 'invalid-recipient
- (string-to-number (match-string 1 string)))
+ (cons (list 'invalid-recipient
+ (string-to-number (match-string 1 string))
+ (match-string 2 string))
(epg-context-result-for epg-context 'error)))))
(defun epg-status-NO_RECP (process string)
(epg-start-decrypt context (epg-make-data-from-file cipher))
(epg-wait-for-completion context)
(if (epg-context-result-for context 'error)
- (error "Decryption failed"))
+ (error "Decrypt failed: %S"
+ (epg-context-result-for context 'error)))
(unless plain
(epg-read-output context)))
(unless plain
(epg-start-decrypt context (epg-make-data-from-file input-file))
(epg-wait-for-completion context)
(if (epg-context-result-for context 'error)
- (error "Decryption failed"))
+ (error "Decrypt failed: %S"
+ (epg-context-result-for context 'error)))
(epg-read-output context))
(epg-delete-output-file context)
(if (file-exists-p input-file)
(epg-start-sign context (epg-make-data-from-file plain) mode)
(epg-wait-for-completion context)
(if (epg-context-result-for context 'error)
- (error "Sign failed"))
+ (error "Sign failed: %S"
+ (epg-context-result-for context 'error)))
(unless signature
(epg-read-output context)))
(unless signature
(epg-start-sign context (epg-make-data-from-string plain) mode)
(epg-wait-for-completion context)
(if (epg-context-result-for context 'error)
- (error "Sign failed"))
+ (error "Sign failed: %S"
+ (epg-context-result-for context 'error)))
(epg-read-output context))
(epg-delete-output-file context)
(epg-reset context)))
recipients sign always-trust)
(epg-wait-for-completion context)
(if (epg-context-result-for context 'error)
- (error "Encrypt failed"))
+ (error "Encrypt failed: %S"
+ (epg-context-result-for context 'error)))
(unless cipher
(epg-read-output context)))
(unless cipher
recipients sign always-trust)
(epg-wait-for-completion context)
(if (epg-context-result-for context 'error)
- (error "Encrypt failed"))
+ (error "Encrypt failed: %S"
+ (epg-context-result-for context 'error)))
(epg-read-output context))
(epg-delete-output-file context)
(epg-reset context)))