diff options
author | Werner Koch <[email protected]> | 2016-09-07 22:45:45 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-09-07 22:45:45 +0000 |
commit | bbe940c095f2bca7a1ca5f8e68ca1af98350a885 (patch) | |
tree | a24139dab158cccee2b01e1e489695838644036f /g10/mainproc.c | |
parent | dirmngr: Terminate on deletion of the socket file (Linux only). (diff) | |
download | gnupg-bbe940c095f2bca7a1ca5f8e68ca1af98350a885.tar.gz gnupg-bbe940c095f2bca7a1ca5f8e68ca1af98350a885.zip |
gpg: Make --output work with --verify.
* g10/mainproc.c (proc_plaintext): Handle opt.output.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | g10/mainproc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c index 7bb43502b..929e18a72 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -757,7 +757,12 @@ proc_plaintext( CTX c, PACKET *pkt ) if (!rc) { - rc = handle_plaintext (pt, &c->mfx, c->sigs_only, clearsig); + /* It we are in --verify mode, we do not want to output the + * signed text. However, if --output is also used we do what + * has been requested and write out the signed data. */ + rc = handle_plaintext (pt, &c->mfx, + (opt.outfp || opt.outfile)? 0 : c->sigs_only, + clearsig); if (gpg_err_code (rc) == GPG_ERR_EACCES && !c->sigs_only) { /* Can't write output but we hash it anyway to check the |