[svn] GnuPG - r3930 - trunk/g10
svn author dshaw
cvs at cvs.gnupg.org
Fri Nov 11 00:25:23 CET 2005
Author: dshaw
Date: 2005-11-11 00:25:20 +0100 (Fri, 11 Nov 2005)
New Revision: 3930
Modified:
trunk/g10/ChangeLog
trunk/g10/keyedit.c
trunk/g10/trustdb.c
Log:
* keyedit.c (keyedit_menu, menu_clean_sigs_from_uids): Add "minimize"
command.
Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog 2005-11-10 23:16:34 UTC (rev 3929)
+++ trunk/g10/ChangeLog 2005-11-10 23:25:20 UTC (rev 3930)
@@ -1,5 +1,8 @@
2005-11-10 David Shaw <dshaw at jabberwocky.com>
+ * keyedit.c (keyedit_menu, menu_clean_sigs_from_uids): Add
+ "minimize" command.
+
* packet.h, keyedit.c (menu_clean_uids_from_key), trustdb.c
(clean_uids_from_key): Fix display bug where sigs cleaned for
other reasons caused a uid to appear as if it had been compacted.
@@ -13,8 +16,8 @@
* trustdb.h, trustdb.c (clean_sigs_from_uid): Add flag to remove
all non-selfsigs from key during cleaning. Change all callers.
- * export.c (do_export_stream): Use it here so we don't need
- additional minimize code in the export path.
+ * export.c (do_export_stream): Use it here for export-minimal so
+ we don't need additional minimize code in the export path.
2005-11-06 David Shaw <dshaw at jabberwocky.com>
Modified: trunk/g10/keyedit.c
===================================================================
--- trunk/g10/keyedit.c 2005-11-10 23:16:34 UTC (rev 3929)
+++ trunk/g10/keyedit.c 2005-11-10 23:25:20 UTC (rev 3930)
@@ -57,7 +57,7 @@
int photo, const char *photo_name );
static void menu_deluid( KBNODE pub_keyblock, KBNODE sec_keyblock );
static int menu_delsig( KBNODE pub_keyblock );
-static int menu_clean_sigs_from_uids(KBNODE keyblock);
+static int menu_clean_sigs_from_uids(KBNODE keyblock,int self_only);
static int menu_clean_uids_from_key(KBNODE keyblock);
static void menu_delkey( KBNODE pub_keyblock, KBNODE sec_keyblock );
static int menu_addrevoker( KBNODE pub_keyblock,
@@ -1341,7 +1341,7 @@
cmdADDREVOKER, cmdTOGGLE, cmdSELKEY, cmdPASSWD, cmdTRUST, cmdPREF,
cmdEXPIRE, cmdBACKSIGN, cmdENABLEKEY, cmdDISABLEKEY, cmdSHOWPREF,
cmdSETPREF, cmdPREFKS, cmdINVCMD, cmdSHOWPHOTO, cmdUPDTRUST, cmdCHKTRUST,
- cmdADDCARDKEY, cmdKEYTOCARD, cmdBKUPTOCARD, cmdCLEAN, cmdNOP
+ cmdADDCARDKEY, cmdKEYTOCARD, cmdBKUPTOCARD, cmdCLEAN, cmdMINIMIZE, cmdNOP
};
static struct
@@ -1443,6 +1443,8 @@
{ "showphoto",cmdSHOWPHOTO , 0, N_("show selected photo IDs") },
{ "clean", cmdCLEAN , KEYEDIT_NOT_SK,
N_("clean unusable parts from key") },
+ { "minimize", cmdMINIMIZE , KEYEDIT_NOT_SK,
+ N_("clean unusable parts from key and remove all signatures") },
{ NULL, cmdNONE, 0, NULL }
};
@@ -2180,7 +2182,7 @@
|| ascii_strcasecmp(arg_string,"signatures")==0
|| ascii_strcasecmp(arg_string,"certs")==0
|| ascii_strcasecmp(arg_string,"certificates")==0)
- modified=menu_clean_sigs_from_uids(keyblock);
+ modified=menu_clean_sigs_from_uids(keyblock,0);
else if(ascii_strcasecmp(arg_string,"uids")==0)
redisplay=modified=menu_clean_uids_from_key(keyblock);
else
@@ -2188,13 +2190,19 @@
}
else
{
- modified=menu_clean_sigs_from_uids(keyblock);
+ modified=menu_clean_sigs_from_uids(keyblock,0);
modified+=menu_clean_uids_from_key(keyblock);
redisplay=modified;
}
}
break;
+ case cmdMINIMIZE:
+ modified=menu_clean_sigs_from_uids(keyblock,1);
+ modified+=menu_clean_uids_from_key(keyblock);
+ redisplay=modified;
+ break;
+
case cmdQUIT:
if( have_commands )
goto leave;
@@ -3184,7 +3192,7 @@
}
static int
-menu_clean_sigs_from_uids(KBNODE keyblock)
+menu_clean_sigs_from_uids(KBNODE keyblock,int self_only)
{
KBNODE uidnode;
int modified=0;
@@ -3199,7 +3207,7 @@
char *user=utf8_to_native(uidnode->pkt->pkt.user_id->name,
uidnode->pkt->pkt.user_id->len,
0);
- deleted=clean_sigs_from_uid(keyblock,uidnode,opt.verbose,0);
+ deleted=clean_sigs_from_uid(keyblock,uidnode,opt.verbose,self_only);
if(deleted)
{
tty_printf(deleted==1?
Modified: trunk/g10/trustdb.c
===================================================================
--- trunk/g10/trustdb.c 2005-11-10 23:16:34 UTC (rev 3929)
+++ trunk/g10/trustdb.c 2005-11-10 23:25:20 UTC (rev 3930)
@@ -1659,8 +1659,6 @@
We don't actually remove the user ID packet itself since it might
be ressurected in a later merge.
- If this self-sig is a revocation, we also include the most recent
- valid regular sig since it is hard to import the user ID otherwise.
TODO: change the import code to allow importing a uid with only a
revocation if the uid already exists on the keyring. */
int
More information about the Gnupg-commits
mailing list