mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-26 01:52:45 +02:00
gpg: Make --skip-hidden-recipients work again.
* g10/pubkey-enc.c (get_session_key): Take care of
opt.skip_hidden_recipients.
--
This was lost due to
Fixes-commit: ce2f717601
GnuPG-bug-id: 4169
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
3c2ffd27f3
commit
79f165d7a8
|
@ -110,6 +110,16 @@ get_session_key (ctrl_t ctrl, struct pubkey_enc_list *list, DEK *dek)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: The list needs to be sorted so that we try the keys in
|
||||||
|
* an appropriate order. For example:
|
||||||
|
* - On-disk keys w/o protection
|
||||||
|
* - On-disk keys with a cached passphrase
|
||||||
|
* - On-card keys of an active card
|
||||||
|
* - On-disk keys with protection
|
||||||
|
* - On-card keys from cards which are not plugged it. Here a
|
||||||
|
* cancel-all button should stop aksing for other cards.
|
||||||
|
* Without any anonymous keys the sorting can be skipped.
|
||||||
|
*/
|
||||||
for (k = list; k; k = k->next)
|
for (k = list; k; k = k->next)
|
||||||
{
|
{
|
||||||
if (!(k->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E
|
if (!(k->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E
|
||||||
|
@ -129,6 +139,9 @@ get_session_key (ctrl_t ctrl, struct pubkey_enc_list *list, DEK *dek)
|
||||||
|
|
||||||
if (!k->keyid[0] && !k->keyid[1])
|
if (!k->keyid[0] && !k->keyid[1])
|
||||||
{
|
{
|
||||||
|
if (opt.skip_hidden_recipients)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!opt.quiet)
|
if (!opt.quiet)
|
||||||
log_info (_("anonymous recipient; trying secret key %s ...\n"),
|
log_info (_("anonymous recipient; trying secret key %s ...\n"),
|
||||||
keystr (keyid));
|
keystr (keyid));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user