* getkey.c (fixup_uidnode, merge_selfsigs_main): Handle both expired
authorDavid Shaw <dshaw@jabberwocky.com>
Wed, 8 Jun 2005 13:12:57 +0000 (13:12 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Wed, 8 Jun 2005 13:12:57 +0000 (13:12 +0000)
and revoked uids in fixup_uidnode().  No need to special case in
merge_selfsigs_main().  This also means that an expired uid will have
its selfsig tagged with chosen_selfsig.

g10/ChangeLog
g10/getkey.c

index 7b4ab51..2f8b617 100644 (file)
@@ -1,3 +1,10 @@
+2005-06-08  David Shaw  <dshaw@jabberwocky.com>
+
+       * getkey.c (fixup_uidnode, merge_selfsigs_main): Handle both
+       expired and revoked uids in fixup_uidnode().  No need to special
+       case in merge_selfsigs_main().  This also means that an expired
+       uid will have its selfsig tagged with chosen_selfsig.
+
 2005-06-07  David Shaw  <dshaw@jabberwocky.com>
 
        * options.h, g10.c (main), export.c (parse_export_options,
index 2647cf3..84eb9ae 100644 (file)
@@ -1347,11 +1347,18 @@ fixup_uidnode ( KBNODE uidnode, KBNODE signode, u32 keycreated )
         return; /* has been revoked */
     }
 
+    uid->expiredate = sig->expiredate;
+
+    if(sig->flags.expired)
+      {
+       uid->is_expired = 1;
+       return; /* has expired */
+      }
+
     uid->created = sig->timestamp; /* this one is okay */
     uid->selfsigversion = sig->version;
     /* If we got this far, it's not expired :) */
     uid->is_expired = 0;
-    uid->expiredate = sig->expiredate;
 
     /* store the key flags in the helper variable for later processing */
     uid->help_key_usage=parse_key_usage(sig);
@@ -1652,19 +1659,9 @@ merge_selfsigs_main(KBNODE keyblock, int *r_revoked, struct revoke_info *rinfo)
                      * the same email address may become valid again (hired,
                      * fired, hired again).
                      */
-                   if(sig->flags.expired)
-                     {
-                       uidnode->pkt->pkt.user_id->is_expired=1;
-                       signode = NULL;
-                     }
-                    else
-                     {
-                       uidnode->pkt->pkt.user_id->is_expired=0;
-                       signode = k;
-                     }
 
                    sigdate = sig->timestamp;
-                   uidnode->pkt->pkt.user_id->expiredate=sig->expiredate;
+                   signode = k;
                    if( sig->version > sigversion )
                      sigversion = sig->version;
                 }