1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

Fix debian bug#543530

This commit is contained in:
Werner Koch 2009-08-26 06:48:45 +00:00
parent 20fe42d10b
commit 4fcae6586d
2 changed files with 35 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-08-26 Werner Koch <wk@g10code.com>
* keyedit.c (menu_revsig): Check for signature right away. Fix
Debian-bug#543530.
2009-08-13 Werner Koch <wk@g10code.com>
* cardglue.h: Add new error code mappings.

View File

@ -4682,6 +4682,36 @@ menu_revsig( KBNODE keyblock )
assert(keyblock->pkt->pkttype==PKT_PUBLIC_KEY);
/* First check whether we have any signatures at all. */
any = 0;
for (node = keyblock; node; node = node->next )
{
node->flag &= ~(NODFLG_SELSIG | NODFLG_MARK_A);
if (node->pkt->pkttype == PKT_USER_ID) {
if (node->flag&NODFLG_SELUID || all)
skip = 0;
else
skip = 1;
}
else if (!skip && node->pkt->pkttype == PKT_SIGNATURE
&& ((sig = node->pkt->pkt.signature),
!seckey_available(sig->keyid) ))
{
if ((sig->sig_class&~3) == 0x10)
{
any = 1;
break;
}
}
}
if (!any)
{
tty_printf (_("Not signed by you.\n"));
return 0;
}
/* FIXME: detect duplicates here */
tty_printf(_("You have signed these user IDs on key %s:\n"),
keystr_from_pk(keyblock->pkt->pkt.public_key));