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:
parent
5bca499750
commit
76b8470915
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user