From b813a663d931ff5b7a004c4020dee51e5fc66c01 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Sat, 7 Feb 2004 15:09:26 +0000 Subject: [PATCH] * getkey.c (merge_selfsigs_main): Properly handle expired user IDs when the expired self-sig is not the only self-sig. --- g10/ChangeLog | 5 +++++ g10/getkey.c | 28 +++++++++++++++------------- 2 files changed, 20 insertions(+), 13 deletions(-) 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; } } }