diff options
author | Werner Koch <wk@gnupg.org> | 2009-08-26 08:46:02 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2009-08-26 08:46:02 +0200 |
commit | f816bdb381bff96041c787dcf4fb179a80f33a1e (patch) | |
tree | a106735b04f6375259956cfeeec9c6898ff2fa61 /g10/keyedit.c | |
parent | New fucntions strconcat and xstrconcat. (diff) | |
download | gnupg2-f816bdb381bff96041c787dcf4fb179a80f33a1e.tar.xz gnupg2-f816bdb381bff96041c787dcf4fb179a80f33a1e.zip |
Fix debian bug#543530
Diffstat (limited to '')
-rw-r--r-- | g10/keyedit.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/g10/keyedit.c b/g10/keyedit.c index f877ace53..3454189f2 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -4719,6 +4719,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)); |