aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2023-12-22 09:33:01 +0000
committerIngo Klöcker <[email protected]>2023-12-22 09:37:34 +0000
commit1dc44b7c5b9253206af527721212d1f55532a7ee (patch)
treec6a81f2c74b695ee1e6e592520b68f72e8cbde00 /src
parentqt,doc: Document that Job::startIt() doesn't self-destruct Job on error (diff)
downloadgpgme-1dc44b7c5b9253206af527721212d1f55532a7ee.tar.gz
gpgme-1dc44b7c5b9253206af527721212d1f55532a7ee.zip
core: Tell gpg that we want to verify signed data
* src/engine-gpg.c (gpg_verify): Add "--verify" to command line. -- Since GnuPG 2.1.16 --verify writes the signed data to the file specified by --output. Explicitly telling gpg that we want to verify signed data frees gpg from guessing what we want and avoids the corresponding warning "no command supplied. Trying to guess what you mean ..." GnuPG-bug-id: 6907
Diffstat (limited to 'src')
-rw-r--r--src/engine-gpg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/engine-gpg.c b/src/engine-gpg.c
index 6954b596..d5b2ab71 100644
--- a/src/engine-gpg.c
+++ b/src/engine-gpg.c
@@ -3775,6 +3775,8 @@ gpg_verify (void *engine, gpgme_verify_flags_t flags, gpgme_data_t sig,
{
/* Normal or cleartext signature. */
const char *output = gpgme_data_get_file_name (plaintext);
+ if (have_gpg_version (gpg, "2.1.16"))
+ err = add_arg (gpg, "--verify");
err = add_arg (gpg, "--output");
if (!err && output)
err = add_arg (gpg, output);