[svn] GnuPG - r3944 - trunk/g10
svn author dshaw
cvs at cvs.gnupg.org
Sun Nov 20 16:02:04 CET 2005
Author: dshaw
Date: 2005-11-20 16:02:03 +0100 (Sun, 20 Nov 2005)
New Revision: 3944
Modified:
trunk/g10/ChangeLog
trunk/g10/keyedit.c
trunk/g10/keylist.c
trunk/g10/main.h
Log:
* main.h, keylist.c (print_revokers): New. Print the "rvk" designated
revoker record. Moved from keyedit.c:show_key_with_all_names_colon.
* keylist.c (list_keyblock_colon): Use it here ...
* keyedit.c (show_key_with_all_names_colon): ... and here.
Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog 2005-11-19 05:55:45 UTC (rev 3943)
+++ trunk/g10/ChangeLog 2005-11-20 15:02:03 UTC (rev 3944)
@@ -1,3 +1,13 @@
+2005-11-20 David Shaw <dshaw at jabberwocky.com>
+
+ * main.h, keylist.c (print_revokers): New. Print the "rvk"
+ designated revoker record. Moved from
+ keyedit.c:show_key_with_all_names_colon.
+
+ * keylist.c (list_keyblock_colon): Use it here ...
+
+ * keyedit.c (show_key_with_all_names_colon): ... and here.
+
2005-11-19 David Shaw <dshaw at jabberwocky.com>
* free-packet.c (copy_secret_key): Copy secret key into secure
Modified: trunk/g10/keyedit.c
===================================================================
--- trunk/g10/keyedit.c 2005-11-19 05:55:45 UTC (rev 3943)
+++ trunk/g10/keyedit.c 2005-11-20 15:02:03 UTC (rev 3944)
@@ -2442,24 +2442,7 @@
putchar('\n');
print_fingerprint (pk, NULL, 0);
-
- /* print the revoker record */
- if( !pk->revkey && pk->numrevkeys )
- BUG();
- else
- {
- for (i=0; i < pk->numrevkeys; i++)
- {
- byte *p;
-
- printf ("rvk:::%d::::::", pk->revkey[i].algid);
- p = pk->revkey[i].fpr;
- for (j=0; j < 20; j++, p++ )
- printf ("%02X", *p);
- printf (":%02x%s:\n", pk->revkey[i].class,
- (pk->revkey[i].class&0x40)?"s":"");
- }
- }
+ print_revokers(pk);
}
}
Modified: trunk/g10/keylist.c
===================================================================
--- trunk/g10/keylist.c 2005-11-19 05:55:45 UTC (rev 3943)
+++ trunk/g10/keylist.c 2005-11-20 15:02:03 UTC (rev 3944)
@@ -1009,7 +1009,30 @@
putchar('\n');
}
+void
+print_revokers(PKT_public_key *pk)
+{
+ /* print the revoker record */
+ if( !pk->revkey && pk->numrevkeys )
+ BUG();
+ else
+ {
+ int i,j;
+ for (i=0; i < pk->numrevkeys; i++)
+ {
+ byte *p;
+
+ printf ("rvk:::%d::::::", pk->revkey[i].algid);
+ p = pk->revkey[i].fpr;
+ for (j=0; j < 20; j++, p++ )
+ printf ("%02X", *p);
+ printf (":%02x%s:\n", pk->revkey[i].class,
+ (pk->revkey[i].class&0x40)?"s":"");
+ }
+ }
+}
+
static void
list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
{
@@ -1073,7 +1096,7 @@
putchar( get_ownertrust_info(pk) );
putchar(':');
}
-
+
if (opt.fixed_list_mode) {
/* do not merge the first uid with the primary key */
putchar(':');
@@ -1094,6 +1117,8 @@
putchar(':'); /* End of field 15. */
}
putchar('\n');
+ if(pk)
+ print_revokers(pk);
if( fpr )
print_fingerprint( pk, sk, 0 );
if( opt.with_key_data )
@@ -1101,7 +1126,6 @@
any = 1;
}
-
for( kbctx=NULL; (node=walk_kbnode( keyblock, &kbctx, 0)) ; ) {
if( node->pkt->pkttype == PKT_USER_ID && !opt.fast_list_mode ) {
PKT_user_id *uid=node->pkt->pkt.user_id;
Modified: trunk/g10/main.h
===================================================================
--- trunk/g10/main.h 2005-11-19 05:55:45 UTC (rev 3943)
+++ trunk/g10/main.h 2005-11-20 15:02:03 UTC (rev 3944)
@@ -250,6 +250,7 @@
void reorder_keyblock (KBNODE keyblock);
void list_keyblock( KBNODE keyblock, int secret, int fpr, void *opaque );
void print_fingerprint (PKT_public_key *pk, PKT_secret_key *sk, int mode);
+void print_revokers(PKT_public_key *pk);
void show_policy_url(PKT_signature *sig,int indent,int mode);
void show_keyserver_url(PKT_signature *sig,int indent,int mode);
void show_notation(PKT_signature *sig,int indent,int mode,int which);
More information about the Gnupg-commits
mailing list