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:
parent
9de7807546
commit
492f05f5b9
@ -1,5 +1,13 @@
|
|||||||
2002-06-15 David Shaw <dshaw@jabberwocky.com>
|
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.
|
* keygen.c (keygen_add_revkey): Remove unused code.
|
||||||
|
|
||||||
* misc.c (check_permissions): Check directory permissions
|
* misc.c (check_permissions): Check directory permissions
|
||||||
|
@ -1587,8 +1587,6 @@ show_key_with_all_names_colon (KBNODE keyblock)
|
|||||||
|
|
||||||
keyid_from_pk (pk, keyid);
|
keyid_from_pk (pk, keyid);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fputs (node->pkt->pkttype == PKT_PUBLIC_KEY?"pub:":"sub:", stdout);
|
fputs (node->pkt->pkttype == PKT_PUBLIC_KEY?"pub:":"sub:", stdout);
|
||||||
if (!pk->is_valid)
|
if (!pk->is_valid)
|
||||||
putchar ('i');
|
putchar ('i');
|
||||||
@ -1643,8 +1641,16 @@ show_key_with_all_names_colon (KBNODE keyblock)
|
|||||||
int trustletter = '?';
|
int trustletter = '?';
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
printf ("uid:%c::::::::", trustletter);
|
if(uid->attrib_data)
|
||||||
print_string (stdout, uid->name, uid->len, ':');
|
{
|
||||||
|
printf ("uat:%c::::::::%u %lu", trustletter,
|
||||||
|
uid->numattribs,uid->attrib_len);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf ("uid:%c::::::::", trustletter);
|
||||||
|
print_string (stdout, uid->name, uid->len, ':');
|
||||||
|
}
|
||||||
putchar (':');
|
putchar (':');
|
||||||
/* signature class */
|
/* signature class */
|
||||||
putchar (':');
|
putchar (':');
|
||||||
@ -1674,6 +1680,8 @@ show_key_with_all_names_colon (KBNODE keyblock)
|
|||||||
putchar ('p');
|
putchar ('p');
|
||||||
if (uid->is_revoked)
|
if (uid->is_revoked)
|
||||||
putchar ('r');
|
putchar ('r');
|
||||||
|
if (uid->is_expired)
|
||||||
|
putchar ('e');
|
||||||
if ((node->flag & NODFLG_SELUID))
|
if ((node->flag & NODFLG_SELUID))
|
||||||
putchar ('s');
|
putchar ('s');
|
||||||
if ((node->flag & NODFLG_MARK_A))
|
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);
|
tty_printf("(%d) ", i);
|
||||||
if ( uid->is_revoked )
|
if ( uid->is_revoked )
|
||||||
tty_printf ("[revoked] ");
|
tty_printf ("[revoked] ");
|
||||||
|
if ( uid->is_expired )
|
||||||
|
tty_printf ("[expired] ");
|
||||||
tty_print_utf8_string( uid->name, uid->len );
|
tty_print_utf8_string( uid->name, uid->len );
|
||||||
tty_printf("\n");
|
tty_printf("\n");
|
||||||
if( with_prefs )
|
if( with_prefs )
|
||||||
@ -2256,6 +2266,7 @@ menu_addrevoker( KBNODE pub_keyblock, KBNODE sec_keyblock )
|
|||||||
"key as a designated revoker? (y/N): "))
|
"key as a designated revoker? (y/N): "))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* todo: handle 0x40 sensitive flag here */
|
||||||
revkey.class=0x80;
|
revkey.class=0x80;
|
||||||
revkey.algid=revoker_pk->pubkey_algo;
|
revkey.algid=revoker_pk->pubkey_algo;
|
||||||
free_public_key(revoker_pk);
|
free_public_key(revoker_pk);
|
||||||
|
@ -439,6 +439,8 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque )
|
|||||||
|
|
||||||
if ( node->pkt->pkt.user_id->is_revoked )
|
if ( node->pkt->pkt.user_id->is_revoked )
|
||||||
fputs ("[revoked] ", stdout);
|
fputs ("[revoked] ", stdout);
|
||||||
|
if ( node->pkt->pkt.user_id->is_expired )
|
||||||
|
fputs ("[expired] ", stdout);
|
||||||
print_utf8_string( stdout, node->pkt->pkt.user_id->name,
|
print_utf8_string( stdout, node->pkt->pkt.user_id->name,
|
||||||
node->pkt->pkt.user_id->len );
|
node->pkt->pkt.user_id->len );
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
@ -676,10 +678,13 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
* Fixme: We need a is_valid flag here too
|
* Fixme: We need a is_valid flag here too
|
||||||
*/
|
*/
|
||||||
if( any ) {
|
if( any ) {
|
||||||
|
char *str=node->pkt->pkt.user_id->attrib_data?"uat":"uid";
|
||||||
if ( node->pkt->pkt.user_id->is_revoked )
|
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 ) {
|
else if ( opt.no_expensive_trust_checks ) {
|
||||||
printf("uid:::::::::");
|
printf("%s:::::::::",str);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
byte namehash[20];
|
byte namehash[20];
|
||||||
@ -697,11 +702,16 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
trustletter = 'u';
|
trustletter = 'u';
|
||||||
printf("uid:%c::::::::", trustletter);
|
printf("%s:%c::::::::",str,trustletter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print_string( stdout, node->pkt->pkt.user_id->name,
|
if(node->pkt->pkt.user_id->attrib_data)
|
||||||
node->pkt->pkt.user_id->len, ':' );
|
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(':');
|
putchar(':');
|
||||||
if (any)
|
if (any)
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
|
@ -732,8 +732,15 @@ print_userid( PACKET *pkt )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if( opt.with_colons )
|
if( opt.with_colons )
|
||||||
print_string( stdout, pkt->pkt.user_id->name,
|
{
|
||||||
pkt->pkt.user_id->len, ':');
|
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
|
else
|
||||||
print_utf8_string( stdout, pkt->pkt.user_id->name,
|
print_utf8_string( stdout, pkt->pkt.user_id->name,
|
||||||
pkt->pkt.user_id->len );
|
pkt->pkt.user_id->len );
|
||||||
@ -857,7 +864,8 @@ list_node( CTX c, KBNODE node )
|
|||||||
else if( node->pkt->pkttype == PKT_USER_ID ) {
|
else if( node->pkt->pkttype == PKT_USER_ID ) {
|
||||||
if( any ) {
|
if( any ) {
|
||||||
if( opt.with_colons )
|
if( opt.with_colons )
|
||||||
printf("uid:::::::::");
|
printf("%s:::::::::",
|
||||||
|
node->pkt->pkt.user_id->attrib_data?"uat":"uid");
|
||||||
else
|
else
|
||||||
printf( "uid%*s", 28, "" );
|
printf( "uid%*s", 28, "" );
|
||||||
}
|
}
|
||||||
@ -931,7 +939,8 @@ list_node( CTX c, KBNODE node )
|
|||||||
else if( node->pkt->pkttype == PKT_USER_ID ) {
|
else if( node->pkt->pkttype == PKT_USER_ID ) {
|
||||||
if( any ) {
|
if( any ) {
|
||||||
if( opt.with_colons )
|
if( opt.with_colons )
|
||||||
printf("uid:::::::::");
|
printf("%s:::::::::",
|
||||||
|
node->pkt->pkt.user_id->attrib_data?"uat":"uid");
|
||||||
else
|
else
|
||||||
printf( "uid%*s", 28, "" );
|
printf( "uid%*s", 28, "" );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user