1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* options.h, g10.c (main), keyserver.c (keyserver_refresh): Maintain and

use the original keyserver URI for cosmetics rather than trying to
recreate it when needed.

* mainproc.c (check_sig_and_print): Properly disregard expired uids.
Make sure that the first uid listed is a real uid and not an attribute
(attributes should only be listed in the "aka" section).  When there are
no valid textual userids, try for an invalid textual userid before using
any attribute uid.
This commit is contained in:
David Shaw 2002-07-02 22:13:00 +00:00
parent 6aaa48054b
commit c6feade425
5 changed files with 41 additions and 7 deletions

View file

@ -1333,8 +1333,13 @@ check_sig_and_print( CTX c, KBNODE node )
continue;
if ( un->pkt->pkt.user_id->is_revoked )
continue;
if ( !un->pkt->pkt.user_id->is_primary )
if ( un->pkt->pkt.user_id->is_expired )
continue;
if ( !un->pkt->pkt.user_id->is_primary )
continue;
/* We want the textual user ID here */
if ( un->pkt->pkt.user_id->attrib_data )
continue;
keyid_str[17] = 0; /* cut off the "[uncertain]" part */
write_status_text_and_buffer (statno, keyid_str,
@ -1350,12 +1355,23 @@ check_sig_and_print( CTX c, KBNODE node )
fputs("\"\n", log_stream() );
count++;
}
if( !count ) { /* just in case that we have no userid */
if( !count ) { /* just in case that we have no valid textual
userid */
/* Try for an invalid textual userid */
for( un=keyblock; un; un = un->next ) {
if( un->pkt->pkttype == PKT_USER_ID )
if( un->pkt->pkttype == PKT_USER_ID &&
!un->pkt->pkt.user_id->attrib_data )
break;
}
/* Try for any userid at all */
if(!un) {
for( un=keyblock; un; un = un->next ) {
if( un->pkt->pkttype == PKT_USER_ID )
break;
}
}
if (opt.always_trust || !un)
keyid_str[17] = 0; /* cut off the "[uncertain]" part */
@ -1384,9 +1400,13 @@ check_sig_and_print( CTX c, KBNODE node )
if( un->pkt->pkttype != PKT_USER_ID )
continue;
if ( un->pkt->pkt.user_id->is_revoked )
continue;
if ( un->pkt->pkt.user_id->is_primary )
continue;
if ( un->pkt->pkt.user_id->is_expired )
continue;
/* Only skip textual primaries */
if ( un->pkt->pkt.user_id->is_primary &&
!un->pkt->pkt.user_id->attrib_data )
continue;
log_info( _(" aka \""));
print_utf8_string( log_stream(), un->pkt->pkt.user_id->name,