aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2007-03-06 06:39:38 +0000
committerDavid Shaw <[email protected]>2007-03-06 06:39:38 +0000
commit57591eb76fd4d672f433ecab2b3513a777202677 (patch)
tree3b2769c33770f66fb85abf987f9cb36b2bf7bb13
parentPost release update (diff)
downloadgnupg-57591eb76fd4d672f433ecab2b3513a777202677.tar.gz
gnupg-57591eb76fd4d672f433ecab2b3513a777202677.zip
* keyedit.c (keyedit_menu): If we modify the keyblock (via
fix_keyblock() or collapse_uids()) make sure we reprocess the keyblock so the flags are correct. Noted by Robin H. Johnson. * getkey.c (fixup_uidnode): Properly clear flags that don't apply to us (revoked, expired) so that we can reprocess a uid.
-rw-r--r--g10/ChangeLog9
-rw-r--r--g10/getkey.c9
-rw-r--r--g10/keyedit.c4
3 files changed, 20 insertions, 2 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index c75dd7181..81676d7ba 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,12 @@
+2007-03-06 David Shaw <[email protected]>
+
+ * keyedit.c (keyedit_menu): If we modify the keyblock (via
+ fix_keyblock() or collapse_uids()) make sure we reprocess the
+ keyblock so the flags are correct. Noted by Robin H. Johnson.
+
+ * getkey.c (fixup_uidnode): Properly clear flags that don't apply
+ to us (revoked, expired) so that we can reprocess a uid.
+
2007-03-01 David Shaw <[email protected]>
* options.h, gpg.c (main), mainproc.c (check_sig_and_print): Allow
diff --git a/g10/getkey.c b/g10/getkey.c
index b99ea234d..eb1d91f6a 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -1485,10 +1485,13 @@ fixup_uidnode ( KBNODE uidnode, KBNODE signode, u32 keycreated )
sig->flags.chosen_selfsig = 1; /* we chose this one */
uid->created = 0; /* not created == invalid */
- if ( IS_UID_REV ( sig ) ) {
+ if ( IS_UID_REV ( sig ) )
+ {
uid->is_revoked = 1;
return; /* has been revoked */
- }
+ }
+ else
+ uid->is_revoked=0;
uid->expiredate = sig->expiredate;
@@ -1497,6 +1500,8 @@ fixup_uidnode ( KBNODE uidnode, KBNODE signode, u32 keycreated )
uid->is_expired = 1;
return; /* has expired */
}
+ else
+ uid->is_expired=0;
uid->created = sig->timestamp; /* this one is okay */
uid->selfsigversion = sig->version;
diff --git a/g10/keyedit.c b/g10/keyedit.c
index d1bf987f7..92f7960d3 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -1541,6 +1541,10 @@ keyedit_menu( const char *username, STRLIST locusr,
if( collapse_uids( &keyblock ) )
modified++;
reorder_keyblock(keyblock);
+ /* We modified the keyblock, so let's make sure the flags are
+ right. */
+ if(modified)
+ merge_keys_and_selfsig( keyblock );
if(seckey_check)
{/* see whether we have a matching secret key */