aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine-gpg.c
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2022-04-27 14:57:17 +0000
committerIngo Klöcker <[email protected]>2022-04-27 14:57:17 +0000
commitaff9aaac68450e76f84d0f9a3feabffe9e82dd7e (patch)
treeb51438e16dc0d2c8641f6f6ef43a0a230718b7c9 /src/engine-gpg.c
parentqt: Rely on the bad passphrase error reported by gpg (diff)
downloadgpgme-aff9aaac68450e76f84d0f9a3feabffe9e82dd7e.tar.gz
gpgme-aff9aaac68450e76f84d0f9a3feabffe9e82dd7e.zip
core: Support --locate-external-keys command of gpg
* src/gpgme.h.in (GPGME_KEYLIST_MODE_FORCE_EXTERN): New. (GPGME_KEYLIST_MODE_LOCATE_EXTERNAL): New. * src/gpgme.c (gpgme_set_keylist_mode): Check for invalid mode. * src/engine-gpg.c (gpg_keylist_build_options): Use "--locate-external-keys" instead of "--locate-keys" if flag is set. * src/gpgme-json.c (op_keylist): New flag "force-extern". * src/gpgme-tool.c (gt_get_keylist_mode, cmd_keylist_mode): Handle new mode. -- GnuPG-bug-id: 5951
Diffstat (limited to 'src/engine-gpg.c')
-rw-r--r--src/engine-gpg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/engine-gpg.c b/src/engine-gpg.c
index 6528e3d5..3bf5223c 100644
--- a/src/engine-gpg.c
+++ b/src/engine-gpg.c
@@ -3105,8 +3105,11 @@ gpg_keylist_build_options (engine_gpg_t gpg, int secret_only,
code. The problem is that we don't know the context
here and thus can't access the cached version number
for the engine info structure. */
- err = add_arg (gpg, "--locate-keys");
- if ((mode & GPGME_KEYLIST_MODE_SIGS))
+ if ((mode & GPGME_KEYLIST_MODE_FORCE_EXTERN))
+ err = add_arg (gpg, "--locate-external-keys");
+ else
+ err = add_arg (gpg, "--locate-keys");
+ if (!err && (mode & GPGME_KEYLIST_MODE_SIGS))
err = add_arg (gpg, "--with-sig-check");
}
else