1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* main.h, keyedit.c, keygen.c: Back out previous (2002-12-01) change.

Minimal isn't always best.

* sign.c (update_keysig_packet): Use the current time rather then a
modification of the original signature time.  Make sure that this doesn't
cause a time warp.

* keygen.c (keygen_add_key_expire): Properly handle a key expiration date
in the past (use a duration of 0).

* keyedit.c (menu_expire): Use update_keysig_packet so any sig subpackets
are maintained during the update.

* build-packet.c (build_sig_subpkt): Mark sig expired or unexpired when
the sig expiration subpacket is added. (build_sig_subpkt_from_sig): Handle
making an expiration subpacket from a sig that has already expired (use a
duration of 0).
This commit is contained in:
David Shaw 2002-12-04 18:32:00 +00:00
parent 6d30580362
commit 2d6a766433
6 changed files with 89 additions and 70 deletions

View file

@ -2526,20 +2526,12 @@ menu_expire( KBNODE pub_keyblock, KBNODE sec_keyblock )
if( !sn )
log_info(_("No corresponding signature in secret ring\n"));
/* create new self signature */
if( mainkey )
rc = make_keysig_packet( &newsig, main_pk, uid, NULL,
sk, 0x13, 0, 0, 0, 0,
keygen_add_std_prefs, main_pk );
rc = update_keysig_packet(&newsig, sig, main_pk, uid, NULL,
sk, keygen_add_key_expire, main_pk);
else
{
struct flags_expire fe;
fe.pk=sub_pk;
fe.sig=sig;
rc = make_keysig_packet( &newsig, main_pk, NULL, sub_pk,
sk, 0x18, 0, 0, 0, 0,
keygen_copy_flags_add_expire,&fe);
}
rc = update_keysig_packet(&newsig, sig, main_pk, NULL, sub_pk,
sk, keygen_add_key_expire, sub_pk );
if( rc ) {
log_error("make_keysig_packet failed: %s\n",
g10_errstr(rc));