aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--g10/ChangeLog12
-rw-r--r--g10/g10.c1
-rw-r--r--g10/keyserver.c4
-rw-r--r--g10/mainproc.c30
-rw-r--r--g10/options.h1
5 files changed, 41 insertions, 7 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 800af3510..d959c5110 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,15 @@
+2002-07-02 David Shaw <[email protected]>
+
+ * 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.
+
2002-07-01 David Shaw <[email protected]>
* options.skel: Fix a few typos, clarify "group", and remove
diff --git a/g10/g10.c b/g10/g10.c
index b8cae1b1c..641cde636 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -1322,6 +1322,7 @@ main( int argc, char **argv )
#endif /* __riscos__ */
break;
case oKeyServer:
+ opt.keyserver_uri=m_strdup(pargs.r.ret_str);
if(parse_keyserver_uri(pargs.r.ret_str,configname,configlineno))
log_error(_("could not parse keyserver URI\n"));
break;
diff --git a/g10/keyserver.c b/g10/keyserver.c
index 9338bfbb7..df7ef48e9 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -905,9 +905,9 @@ keyserver_refresh(STRLIST users)
return rc;
if(count==1)
- log_info(_("%d key to refresh\n"),count);
+ log_info(_("refreshing 1 key from %s\n"),opt.keyserver_uri);
else
- log_info(_("%d keys to refresh\n"),count);
+ log_info(_("refreshing %d keys from %s\n"),count,opt.keyserver_uri);
if(count>0)
rc=keyserver_work(GET,NULL,desc,count);
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,
diff --git a/g10/options.h b/g10/options.h
index 74cebe575..c1e131fe8 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -111,6 +111,7 @@ struct {
int not_dash_escaped;
int escape_from;
int lock_once;
+ char *keyserver_uri;
char *keyserver_scheme;
char *keyserver_host;
char *keyserver_port;