* mainproc.c (check_sig_and_print): Get the uid validity before printing
authorDavid Shaw <dshaw@jabberwocky.com>
Sun, 24 Aug 2003 23:01:26 +0000 (23:01 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Sun, 24 Aug 2003 23:01:26 +0000 (23:01 +0000)
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.

g10/ChangeLog
g10/g10.c
g10/mainproc.c

index 4075bb7..5dd0c0a 100644 (file)
@@ -1,3 +1,12 @@
+2003-08-24  David Shaw  <dshaw@jabberwocky.com>
+
+       * 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  <dshaw@jabberwocky.com>
 
        * gpgv.c: Remove extra semicolon (typo).
index 77936f5..7b5cfbc 100644 (file)
--- 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,"@"},
index 8cb7b98..1762497 100644 (file)
@@ -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++;