1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-15 00:29:49 +02:00

* keyedit.c (menu_revsig): Change "revsig" to honor selected uids so the

user can revoke sigs from particular uids only.

* keylist.c (list_keyblock_print): Don't display expired uids in
--list-keys unless -v and not --list-sigs (just like revoked uids).
This commit is contained in:
David Shaw 2002-07-25 22:59:25 +00:00
parent 52b1efab84
commit bb99f6c828
3 changed files with 25 additions and 11 deletions

View File

@ -1,5 +1,12 @@
2002-07-25 David Shaw <dshaw@jabberwocky.com> 2002-07-25 David Shaw <dshaw@jabberwocky.com>
* keyedit.c (menu_revsig): Change "revsig" to honor selected uids
so the user can revoke sigs from particular uids only.
* keylist.c (list_keyblock_print): Don't display expired uids in
--list-keys unless -v and not --list-sigs (just like revoked
uids).
* exec.c, export.c, import.c, keyedit.c, keyserver.c, misc.c: * exec.c, export.c, import.c, keyedit.c, keyserver.c, misc.c:
"Warning" -> "WARNING" "Warning" -> "WARNING"

View File

@ -2878,7 +2878,7 @@ menu_revsig( KBNODE keyblock )
PKT_public_key *primary_pk; PKT_public_key *primary_pk;
KBNODE node; KBNODE node;
int changed = 0; int changed = 0;
int rc, any; int rc, any, skip=1, all=!count_selected_uids(keyblock);
struct revocation_reason_info *reason = NULL; struct revocation_reason_info *reason = NULL;
/* FIXME: detect duplicates here */ /* FIXME: detect duplicates here */
@ -2886,13 +2886,18 @@ menu_revsig( KBNODE keyblock )
for( node = keyblock; node; node = node->next ) { for( node = keyblock; node; node = node->next ) {
node->flag &= ~(NODFLG_SELSIG | NODFLG_MARK_A); node->flag &= ~(NODFLG_SELSIG | NODFLG_MARK_A);
if( node->pkt->pkttype == PKT_USER_ID ) { if( node->pkt->pkttype == PKT_USER_ID ) {
PKT_user_id *uid = node->pkt->pkt.user_id; if( node->flag&NODFLG_SELUID || all ) {
/* Hmmm: Should we show only UIDs with a signature? */ PKT_user_id *uid = node->pkt->pkt.user_id;
tty_printf(" "); /* Hmmm: Should we show only UIDs with a signature? */
tty_print_utf8_string( uid->name, uid->len ); tty_printf(" ");
tty_printf("\n"); tty_print_utf8_string( uid->name, uid->len );
tty_printf("\n");
skip=0;
}
else
skip=1;
} }
else if( node->pkt->pkttype == PKT_SIGNATURE else if( !skip && node->pkt->pkttype == PKT_SIGNATURE
&& ((sig = node->pkt->pkt.signature), && ((sig = node->pkt->pkt.signature),
!seckey_available(sig->keyid) ) ) { !seckey_available(sig->keyid) ) ) {
if( (sig->sig_class&~3) == 0x10 ) { if( (sig->sig_class&~3) == 0x10 ) {

View File

@ -428,10 +428,12 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque )
if( node->pkt->pkttype == PKT_USER_ID && !opt.fast_list_mode ) { if( node->pkt->pkttype == PKT_USER_ID && !opt.fast_list_mode ) {
if(attrib_fp && node->pkt->pkt.user_id->attrib_data!=NULL) if(attrib_fp && node->pkt->pkt.user_id->attrib_data!=NULL)
dump_attribs(node->pkt->pkt.user_id,pk,sk); dump_attribs(node->pkt->pkt.user_id,pk,sk);
/* don't list revoked UIDS unless we are in verbose mode and /* don't list revoked or expired UIDS unless we are in
* signature listing has not been requested */ * verbose mode and signature listing has not been
if ( !opt.verbose && !opt.list_sigs * requested */
&& node->pkt->pkt.user_id->is_revoked ) if ( !opt.verbose && !opt.list_sigs &&
(node->pkt->pkt.user_id->is_revoked ||
node->pkt->pkt.user_id->is_expired ))
continue; continue;
if( any ) if( any )