diff options
Diffstat (limited to 'g10/getkey.c')
-rw-r--r-- | g10/getkey.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/g10/getkey.c b/g10/getkey.c index 9cad71b37..777f3833f 100644 --- a/g10/getkey.c +++ b/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; |