mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Make decryption of -R work w/o --try-secret-key or --default-key.
* g10/getkey.c (enum_secret_keys): At state 3 enumerate the keys in all
cases not just when --try-all-secrets is used.
--
Regression-due-to: 82b90eee10
Reported-by: Carola Grunwald
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
0a5a854510
commit
bdbd03608b
1 changed files with 7 additions and 10 deletions
|
@ -3620,9 +3620,7 @@ enum_secret_keys (ctrl_t ctrl, void **context, PKT_public_key *sk)
|
|||
c->state++;
|
||||
break;
|
||||
|
||||
case 3: /* Init search context to try all keys. */
|
||||
if (opt.try_all_secrets)
|
||||
{
|
||||
case 3: /* Init search context to enum all secret keys. */
|
||||
err = getkey_bynames (&c->ctx, NULL, NULL, 1, &keyblock);
|
||||
if (err)
|
||||
{
|
||||
|
@ -3631,7 +3629,6 @@ enum_secret_keys (ctrl_t ctrl, void **context, PKT_public_key *sk)
|
|||
getkey_end (c->ctx);
|
||||
c->ctx = NULL;
|
||||
}
|
||||
}
|
||||
c->state++;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue