From 1b07e3723e49d38c110b2cc503dd364a36f16bdc Mon Sep 17 00:00:00 2001 From: David Shaw Date: Wed, 8 Jun 2005 13:12:57 +0000 Subject: [PATCH] * 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. --- g10/ChangeLog | 7 +++++++ g10/getkey.c | 21 +++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/g10/ChangeLog b/g10/ChangeLog index 7b4ab51a9..2f8b61754 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,10 @@ +2005-06-08 David Shaw + + * 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 * options.h, g10.c (main), export.c (parse_export_options, diff --git a/g10/getkey.c b/g10/getkey.c index 2647cf373..84eb9aecf 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -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; }