mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* keylist.c (list_keyblock_print): Show the fingerprint after the key, not
after the first user ID. * keyedit.c (show_key_with_all_names): Don't show validity if we're just printing user IDs for signing. * armor.c (fake_packet): Properly handle the case where the line is dash-space (i.e. a blank line that was quoted). Give a warning for bad dash escaping.
This commit is contained in:
parent
f294ce2d8b
commit
f13bba108a
4 changed files with 104 additions and 102 deletions
|
@ -651,7 +651,6 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque )
|
|||
KBNODE node;
|
||||
PKT_public_key *pk;
|
||||
PKT_secret_key *sk;
|
||||
int any=0;
|
||||
struct sig_stats *stats=opaque;
|
||||
int skip_sigs=0;
|
||||
|
||||
|
@ -735,6 +734,12 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque )
|
|||
printf("\n");
|
||||
}
|
||||
|
||||
if( fpr )
|
||||
print_fingerprint( pk, sk, 0 );
|
||||
print_card_serialno (sk);
|
||||
if( opt.with_key_data )
|
||||
print_key_data( pk );
|
||||
|
||||
for( kbctx=NULL; (node=walk_kbnode( keyblock, &kbctx, 0)) ; ) {
|
||||
if( node->pkt->pkttype == PKT_USER_ID && !opt.fast_list_mode ) {
|
||||
PKT_user_id *uid=node->pkt->pkt.user_id;
|
||||
|
@ -776,14 +781,6 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque )
|
|||
|
||||
print_utf8_string( stdout, uid->name, uid->len );
|
||||
putchar('\n');
|
||||
if( !any ) {
|
||||
if( fpr )
|
||||
print_fingerprint( pk, sk, 0 );
|
||||
print_card_serialno (sk);
|
||||
if( opt.with_key_data )
|
||||
print_key_data( pk );
|
||||
any = 1;
|
||||
}
|
||||
|
||||
if((opt.list_options&LIST_SHOW_PHOTOS) && uid->attribs!=NULL)
|
||||
show_photos(uid->attribs,uid->numattribs,pk,sk);
|
||||
|
@ -801,14 +798,6 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque )
|
|||
else
|
||||
skip_sigs=0;
|
||||
|
||||
if( !any )
|
||||
{
|
||||
putchar('\n');
|
||||
if( fpr )
|
||||
print_fingerprint( pk, sk, 0 ); /* of the main key */
|
||||
any = 1;
|
||||
}
|
||||
|
||||
printf("sub %4u%c/%s %s",
|
||||
nbits_from_pk( pk2 ),pubkey_letter( pk2->pubkey_algo ),
|
||||
keystr_from_pk(pk2),datestr_from_pk(pk2));
|
||||
|
@ -840,15 +829,6 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque )
|
|||
{
|
||||
PKT_secret_key *sk2 = node->pkt->pkt.secret_key;
|
||||
|
||||
if( !any )
|
||||
{
|
||||
putchar('\n');
|
||||
if( fpr )
|
||||
print_fingerprint( pk, sk, 0 ); /* of the main key */
|
||||
print_card_serialno (sk);
|
||||
any = 1;
|
||||
}
|
||||
|
||||
printf("ssb%c %4u%c/%s %s",
|
||||
(sk2->protect.s2k.mode==1001)?'#':
|
||||
(sk2->protect.s2k.mode==1002)?'>':' ',
|
||||
|
@ -894,25 +874,6 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque )
|
|||
sigrc = ' ';
|
||||
}
|
||||
|
||||
if( !any ) { /* no user id, (maybe a revocation follows)*/
|
||||
/* Check if the pk is really revoked - there could be a
|
||||
0x20 sig packet there even if we are not revoked
|
||||
(say, if a revocation key issued the packet, but the
|
||||
revocation key isn't present to verify it.) */
|
||||
if( sig->sig_class == 0x20 && pk->is_revoked )
|
||||
puts("[revoked]");
|
||||
else if( sig->sig_class == 0x18 )
|
||||
puts("[key binding]");
|
||||
else if( sig->sig_class == 0x28 )
|
||||
puts("[subkey revoked]");
|
||||
else
|
||||
putchar('\n');
|
||||
if( fpr )
|
||||
print_fingerprint( pk, sk, 0 );
|
||||
print_card_serialno (sk);
|
||||
any=1;
|
||||
}
|
||||
|
||||
if( sig->sig_class == 0x20 || sig->sig_class == 0x28
|
||||
|| sig->sig_class == 0x30 )
|
||||
sigstr = "rev";
|
||||
|
@ -1535,7 +1496,7 @@ print_card_serialno (PKT_secret_key *sk)
|
|||
if (!sk->is_protected || sk->protect.s2k.mode != 1002)
|
||||
return; /* Not a card. */
|
||||
if (opt.with_colons)
|
||||
return; /* Handled elesewhere. */
|
||||
return; /* Handled elsewhere. */
|
||||
|
||||
fputs (_(" Card serial no. ="), stdout);
|
||||
putchar (' ');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue