diff --git a/g10/ChangeLog b/g10/ChangeLog index 04710bba3..e093bd685 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,8 @@ +2004-02-06 David Shaw + + * getkey.c (merge_selfsigs_main): Properly handle expired user IDs + when the expired self-sig is not the only self-sig. + 2004-01-29 David Shaw * decrypt.c: Fix copyright date. diff --git a/g10/getkey.c b/g10/getkey.c index 7c4897964..590068b77 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -1574,19 +1574,21 @@ merge_selfsigs_main( KBNODE keyblock, int *r_revoked ) * the same email address may become valid again (hired, * fired, hired again). */ - if(sig->flags.expired) { - /* Expired uids don't get to be primary unless - they are the only uid there is. */ - uidnode->pkt->pkt.user_id->is_primary=0; - uidnode->pkt->pkt.user_id->is_expired=1; - uidnode->pkt->pkt.user_id->expiredate=sig->expiredate; - } - else { - sigdate = sig->timestamp; - signode = k; - if( sig->version > sigversion ) - sigversion = sig->version; - } + 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; + if( sig->version > sigversion ) + sigversion = sig->version; } } }