1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00

* keyedit.c (show_key_with_all_names), keylist.c (list_keyblock_print):

Show "[expired]" before expired uids.

* keyedit.c (show_key_with_all_names_colon), mainproc.c (list_node),
keylist.c (list_keyblock_colon): Use "uat" for user attribute packets
instead of "uid".  Also use '<count> <length>' rather than the fake user
id string.
This commit is contained in:
David Shaw 2002-06-15 12:25:54 +00:00
parent 9de7807546
commit 492f05f5b9
4 changed files with 51 additions and 13 deletions

View File

@ -1,5 +1,13 @@
2002-06-15 David Shaw <dshaw@jabberwocky.com>
* keyedit.c (show_key_with_all_names), keylist.c
(list_keyblock_print): Show "[expired]" before expired uids.
* keyedit.c (show_key_with_all_names_colon), mainproc.c
(list_node), keylist.c (list_keyblock_colon): Use "uat" for user
attribute packets instead of "uid". Also use '<count> <length>'
rather than the fake user id string.
* keygen.c (keygen_add_revkey): Remove unused code.
* misc.c (check_permissions): Check directory permissions

View File

@ -1587,8 +1587,6 @@ show_key_with_all_names_colon (KBNODE keyblock)
keyid_from_pk (pk, keyid);
fputs (node->pkt->pkttype == PKT_PUBLIC_KEY?"pub:":"sub:", stdout);
if (!pk->is_valid)
putchar ('i');
@ -1643,8 +1641,16 @@ show_key_with_all_names_colon (KBNODE keyblock)
int trustletter = '?';
++i;
if(uid->attrib_data)
{
printf ("uat:%c::::::::%u %lu", trustletter,
uid->numattribs,uid->attrib_len);
}
else
{
printf ("uid:%c::::::::", trustletter);
print_string (stdout, uid->name, uid->len, ':');
}
putchar (':');
/* signature class */
putchar (':');
@ -1674,6 +1680,8 @@ show_key_with_all_names_colon (KBNODE keyblock)
putchar ('p');
if (uid->is_revoked)
putchar ('r');
if (uid->is_expired)
putchar ('e');
if ((node->flag & NODFLG_SELUID))
putchar ('s');
if ((node->flag & NODFLG_MARK_A))
@ -1819,6 +1827,8 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker,
tty_printf("(%d) ", i);
if ( uid->is_revoked )
tty_printf ("[revoked] ");
if ( uid->is_expired )
tty_printf ("[expired] ");
tty_print_utf8_string( uid->name, uid->len );
tty_printf("\n");
if( with_prefs )
@ -2256,6 +2266,7 @@ menu_addrevoker( KBNODE pub_keyblock, KBNODE sec_keyblock )
"key as a designated revoker? (y/N): "))
continue;
/* todo: handle 0x40 sensitive flag here */
revkey.class=0x80;
revkey.algid=revoker_pk->pubkey_algo;
free_public_key(revoker_pk);

View File

@ -439,6 +439,8 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque )
if ( node->pkt->pkt.user_id->is_revoked )
fputs ("[revoked] ", stdout);
if ( node->pkt->pkt.user_id->is_expired )
fputs ("[expired] ", stdout);
print_utf8_string( stdout, node->pkt->pkt.user_id->name,
node->pkt->pkt.user_id->len );
putchar('\n');
@ -676,10 +678,13 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
* Fixme: We need a is_valid flag here too
*/
if( any ) {
char *str=node->pkt->pkt.user_id->attrib_data?"uat":"uid";
if ( node->pkt->pkt.user_id->is_revoked )
printf("uid:r::::::::");
printf("%s:r::::::::",str);
else if ( node->pkt->pkt.user_id->is_expired )
printf("%s:e::::::::",str);
else if ( opt.no_expensive_trust_checks ) {
printf("uid:::::::::");
printf("%s:::::::::",str);
}
else {
byte namehash[20];
@ -697,9 +702,14 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
}
else
trustletter = 'u';
printf("uid:%c::::::::", trustletter);
printf("%s:%c::::::::",str,trustletter);
}
}
if(node->pkt->pkt.user_id->attrib_data)
printf("%u %lu",
node->pkt->pkt.user_id->numattribs,
node->pkt->pkt.user_id->attrib_len);
else
print_string( stdout, node->pkt->pkt.user_id->name,
node->pkt->pkt.user_id->len, ':' );
putchar(':');

View File

@ -732,8 +732,15 @@ print_userid( PACKET *pkt )
return;
}
if( opt.with_colons )
{
if(pkt->pkt.user_id->attrib_data)
printf("%u %lu",
pkt->pkt.user_id->numattribs,
pkt->pkt.user_id->attrib_len);
else
print_string( stdout, pkt->pkt.user_id->name,
pkt->pkt.user_id->len, ':');
}
else
print_utf8_string( stdout, pkt->pkt.user_id->name,
pkt->pkt.user_id->len );
@ -857,7 +864,8 @@ list_node( CTX c, KBNODE node )
else if( node->pkt->pkttype == PKT_USER_ID ) {
if( any ) {
if( opt.with_colons )
printf("uid:::::::::");
printf("%s:::::::::",
node->pkt->pkt.user_id->attrib_data?"uat":"uid");
else
printf( "uid%*s", 28, "" );
}
@ -931,7 +939,8 @@ list_node( CTX c, KBNODE node )
else if( node->pkt->pkttype == PKT_USER_ID ) {
if( any ) {
if( opt.with_colons )
printf("uid:::::::::");
printf("%s:::::::::",
node->pkt->pkt.user_id->attrib_data?"uat":"uid");
else
printf( "uid%*s", 28, "" );
}