diff --git a/g10/ChangeLog b/g10/ChangeLog index 4075bb77a..5dd0c0a13 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,12 @@ +2003-08-24 David Shaw + + * mainproc.c (check_sig_and_print): Get the uid validity before + printing any sig results to avoid munging the output with trustdb + warnings. + + * g10.c (main): Don't include --show-keyring in --help as it is + deprecated. + 2003-08-21 David Shaw * gpgv.c: Remove extra semicolon (typo). diff --git a/g10/g10.c b/g10/g10.c index 77936f59f..7b5cfbc9b 100644 --- a/g10/g10.c +++ b/g10/g10.c @@ -432,7 +432,7 @@ static ARGPARSE_OPTS opts[] = { { oKeyring, "keyring" ,2, N_("add this keyring to the list of keyrings")}, { oPrimaryKeyring, "primary-keyring",2, "@" }, { oSecretKeyring, "secret-keyring" ,2, N_("add this secret keyring to the list")}, - { oShowKeyring, "show-keyring", 0, N_("show which keyring a listed key is on")}, + { oShowKeyring, "show-keyring", 0, "@"}, { oDefaultKey, "default-key" ,2, N_("|NAME|use NAME as default secret key")}, { oKeyServer, "keyserver",2, N_("|HOST|use this keyserver to lookup keys")}, { oKeyServerOptions, "keyserver-options",2,"@"}, diff --git a/g10/mainproc.c b/g10/mainproc.c index 8cb7b9825..1762497f8 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -1329,6 +1329,7 @@ check_sig_and_print( CTX c, KBNODE node ) /* find and print the primary user ID */ for( un=keyblock; un; un = un->next ) { + int valid; if(un->pkt->pkttype==PKT_PUBLIC_KEY) { pk=un->pkt->pkt.public_key; @@ -1350,6 +1351,11 @@ check_sig_and_print( CTX c, KBNODE node ) assert(pk); + /* Get it before we print anything to avoid interrupting + the output with the "please do a --check-trustdb" + line. */ + valid=get_validity(pk,un->pkt->pkt.user_id); + keyid_str[17] = 0; /* cut off the "[uncertain]" part */ write_status_text_and_buffer (statno, keyid_str, un->pkt->pkt.user_id->name, @@ -1362,9 +1368,7 @@ check_sig_and_print( CTX c, KBNODE node ) print_utf8_string( log_stream(), un->pkt->pkt.user_id->name, un->pkt->pkt.user_id->len ); if(opt.verify_options&VERIFY_SHOW_VALIDITY) - fprintf(log_stream(),"\" [%s]\n", - trust_value_to_string(get_validity(pk, - un->pkt->pkt.user_id))); + fprintf(log_stream(),"\" [%s]\n",trust_value_to_string(valid)); else fputs("\"\n", log_stream() ); count++;