diff options
author | Andre Heinecke <[email protected]> | 2018-07-04 09:13:26 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2018-07-04 09:14:44 +0000 |
commit | 76b847091593669c8a7e38918267d6be97dbd4d0 (patch) | |
tree | 2031456ee666e86cac22ae41af5e6000c65e4e27 /src/gpgme-json.c | |
parent | python bindings: scheming serpents (diff) | |
download | gpgme-76b847091593669c8a7e38918267d6be97dbd4d0.tar.gz gpgme-76b847091593669c8a7e38918267d6be97dbd4d0.zip |
json: Add keylist mode locate
* src/gpgme-json.c (op_keylist, hlp_keylist): Add locate.
--
The same rationale for the KEYLIST_MODE_LOCATE in GPGME
also applies here. It makes the API a little less magic.
Diffstat (limited to 'src/gpgme-json.c')
-rw-r--r-- | src/gpgme-json.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpgme-json.c b/src/gpgme-json.c index d7e1cbc6..8d534c67 100644 --- a/src/gpgme-json.c +++ b/src/gpgme-json.c @@ -2125,6 +2125,7 @@ static const char hlp_keylist[] = "tofu: Add KEYLIST_MODE_WITH_TOFU.\n" "ephemeral: Add KEYLIST_MODE_EPHEMERAL.\n" "validate: Add KEYLIST_MODE_VALIDATE.\n" + "locate: Add KEYLIST_MODE_LOCATE.\n" "\n" "Response on success:\n" "keys: Array of keys.\n" @@ -2290,6 +2291,11 @@ op_keylist (cjson_t request, cjson_t result) if (abool) mode |= GPGME_KEYLIST_MODE_VALIDATE; + if ((err = get_boolean_flag (request, "locate", 0, &abool))) + goto leave; + if (abool) + mode |= GPGME_KEYLIST_MODE_LOCATE; + if (!mode) { /* default to local */ |