mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-09 12:54:23 +01:00
gpg: New mechanism "clear" for --auto-key-locate.
* g10/getkey.c (parse_auto_key_locate): Implement "clear".
This commit is contained in:
parent
2223eaefaf
commit
1d642d3ca8
@ -1482,6 +1482,10 @@ mechanisms, in the order they are to be tried:
|
||||
position of this mechanism in the list does not matter. It is not
|
||||
required if @code{local} is also used.
|
||||
|
||||
@item clear
|
||||
Clear all defined mechanisms. This is usefule to override
|
||||
mechanisms fiven in a config file.
|
||||
|
||||
@end table
|
||||
|
||||
@item --keyid-format @code{short|0xshort|long|0xlong}
|
||||
|
11
g10/getkey.c
11
g10/getkey.c
@ -712,7 +712,7 @@ get_pubkey_byname (ctrl_t ctrl, GETKEY_CTX * retctx, PKT_public_key * pk,
|
||||
|
||||
is_mbox = is_valid_mailbox (name);
|
||||
|
||||
/* Check whether we the default local search has been disabled.
|
||||
/* Check whether the default local search has been disabled.
|
||||
This is the case if either the "nodefault" or the "local" keyword
|
||||
are in the list of auto key locate mechanisms.
|
||||
|
||||
@ -2809,7 +2809,14 @@ parse_auto_key_locate (char *options)
|
||||
|
||||
akl = xmalloc_clear (sizeof (*akl));
|
||||
|
||||
if (ascii_strcasecmp (tok, "nodefault") == 0)
|
||||
if (ascii_strcasecmp (tok, "clear") == 0)
|
||||
{
|
||||
xfree (akl);
|
||||
free_akl (opt.auto_key_locate);
|
||||
opt.auto_key_locate = NULL;
|
||||
continue;
|
||||
}
|
||||
else if (ascii_strcasecmp (tok, "nodefault") == 0)
|
||||
akl->type = AKL_NODEFAULT;
|
||||
else if (ascii_strcasecmp (tok, "local") == 0)
|
||||
akl->type = AKL_LOCAL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user