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.
This commit is contained in:
Andre Heinecke 2018-07-04 11:13:26 +02:00
parent 5bca499750
commit 76b8470915
No known key found for this signature in database
GPG Key ID: 2978E9D40CBABA5C

View File

@ -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 */