aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog3
-rw-r--r--g10/g10.c1
-rw-r--r--g10/mainproc.c26
-rw-r--r--g10/options.h13
4 files changed, 28 insertions, 15 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 4e752c029..a6e00c62c 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,5 +1,8 @@
2003-09-30 David Shaw <[email protected]>
+ * options.h, g10.c (main), mainproc.c (check_sig_and_print): Add
+ --verify-option show-unusable-uids.
+
* gpgv.c (check_trustdb_stale): Stub.
* trustdb.c (get_validity): Move the up-to-date check to
diff --git a/g10/g10.c b/g10/g10.c
index f50bbe88b..35ce3e038 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -1829,6 +1829,7 @@ main( int argc, char **argv )
{"show-keyserver-url",VERIFY_SHOW_KEYSERVER},
{"show-validity",VERIFY_SHOW_VALIDITY},
{"show-long-keyid",VERIFY_SHOW_LONG_KEYID},
+ {"show-unusable-uids",VERIFY_SHOW_UNUSABLE_UIDS},
{NULL,0}
};
diff --git a/g10/mainproc.c b/g10/mainproc.c
index f92181e2b..e6522f1ed 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -1345,7 +1345,7 @@ check_sig_and_print( CTX c, KBNODE node )
continue;
if ( !un->pkt->pkt.user_id->is_primary )
continue;
- /* We want the textual user ID here */
+ /* We want the textual primary user ID here */
if ( un->pkt->pkt.user_id->attrib_data )
continue;
@@ -1417,10 +1417,10 @@ check_sig_and_print( CTX c, KBNODE node )
for( un=keyblock; un; un = un->next ) {
if( un->pkt->pkttype != PKT_USER_ID )
continue;
- if ( un->pkt->pkt.user_id->is_revoked )
- continue;
- if ( un->pkt->pkt.user_id->is_expired )
- continue;
+ if((un->pkt->pkt.user_id->is_revoked
+ || un->pkt->pkt.user_id->is_expired)
+ && !(opt.verify_options&VERIFY_SHOW_UNUSABLE_UIDS))
+ continue;
/* Only skip textual primaries */
if ( un->pkt->pkt.user_id->is_primary &&
!un->pkt->pkt.user_id->attrib_data )
@@ -1440,10 +1440,18 @@ check_sig_and_print( CTX c, KBNODE node )
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)));
+ {
+ const char *valid;
+ if(un->pkt->pkt.user_id->is_revoked)
+ valid=_("revoked");
+ else if(un->pkt->pkt.user_id->is_expired)
+ valid=_("expired");
+ else
+ valid=trust_value_to_string(get_validity(pk,
+ un->pkt->
+ pkt.user_id));
+ fprintf(log_stream(),"\" [%s]\n",valid);
+ }
else
fputs("\"\n", log_stream() );
}
diff --git a/g10/options.h b/g10/options.h
index c4fd89d52..64a803c22 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -247,11 +247,12 @@ struct {
#define LIST_SHOW_KEYRING (1<<7)
#define LIST_SHOW_SIG_EXPIRE (1<<8)
-#define VERIFY_SHOW_PHOTOS (1<<0)
-#define VERIFY_SHOW_POLICY (1<<1)
-#define VERIFY_SHOW_NOTATION (1<<2)
-#define VERIFY_SHOW_KEYSERVER (1<<3)
-#define VERIFY_SHOW_VALIDITY (1<<4)
-#define VERIFY_SHOW_LONG_KEYID (1<<5)
+#define VERIFY_SHOW_PHOTOS (1<<0)
+#define VERIFY_SHOW_POLICY (1<<1)
+#define VERIFY_SHOW_NOTATION (1<<2)
+#define VERIFY_SHOW_KEYSERVER (1<<3)
+#define VERIFY_SHOW_VALIDITY (1<<4)
+#define VERIFY_SHOW_LONG_KEYID (1<<5)
+#define VERIFY_SHOW_UNUSABLE_UIDS (1<<6)
#endif /*G10_OPTIONS_H*/