aboutsummaryrefslogtreecommitdiffstats
path: root/g10/mainproc.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2002-07-02 22:13:00 +0000
committerDavid Shaw <[email protected]>2002-07-02 22:13:00 +0000
commitc6feade425cef16e25bc763afe648b160e7d817b (patch)
treec1542e2d868d82241c41c28eb2f5c7c190e629dc /g10/mainproc.c
parent* verify.c (gpgsm_verify): Extend the STATUS_BADSIG line with (diff)
downloadgnupg-c6feade425cef16e25bc763afe648b160e7d817b.tar.gz
gnupg-c6feade425cef16e25bc763afe648b160e7d817b.zip
* 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.
Diffstat (limited to '')
-rw-r--r--g10/mainproc.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c
index bcd1c1c01..d70003380 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -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,