1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-04-17 15:44:34 +02:00

* getkey.c (merge_selfsigs_main): Properly handle expired user IDs when

the expired self-sig is not the only self-sig.
This commit is contained in:
David Shaw 2004-02-07 15:09:26 +00:00
parent 8520a742f1
commit b813a663d9
2 changed files with 20 additions and 13 deletions

View File

@ -1,3 +1,8 @@
2004-02-06 David Shaw <dshaw@jabberwocky.com>
* 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 <dshaw@jabberwocky.com> 2004-01-29 David Shaw <dshaw@jabberwocky.com>
* decrypt.c: Fix copyright date. * decrypt.c: Fix copyright date.

View File

@ -1574,23 +1574,25 @@ merge_selfsigs_main( KBNODE keyblock, int *r_revoked )
* the same email address may become valid again (hired, * the same email address may become valid again (hired,
* fired, hired again). * fired, hired again).
*/ */
if(sig->flags.expired) { 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->is_expired=1;
uidnode->pkt->pkt.user_id->expiredate=sig->expiredate; signode = NULL;
} }
else { else
sigdate = sig->timestamp; {
uidnode->pkt->pkt.user_id->is_expired=0;
signode = k; signode = k;
}
sigdate = sig->timestamp;
uidnode->pkt->pkt.user_id->expiredate=sig->expiredate;
if( sig->version > sigversion ) if( sig->version > sigversion )
sigversion = sig->version; sigversion = sig->version;
} }
} }
} }
} }
}
if ( uidnode && signode ) { if ( uidnode && signode ) {
fixup_uidnode ( uidnode, signode, keytimestamp ); fixup_uidnode ( uidnode, signode, keytimestamp );
pk->is_valid = 1; pk->is_valid = 1;