[svn] GnuPG - r4419 - branches/STABLE-BRANCH-1-4/g10
svn author dshaw
cvs at cvs.gnupg.org
Wed Jan 31 21:44:49 CET 2007
Author: dshaw
Date: 2007-01-31 21:44:48 +0100 (Wed, 31 Jan 2007)
New Revision: 4419
Modified:
branches/STABLE-BRANCH-1-4/g10/ChangeLog
branches/STABLE-BRANCH-1-4/g10/keyedit.c
Log:
* keyedit.c (sign_uids): Another multiple to single timestamp
operation.
Modified: branches/STABLE-BRANCH-1-4/g10/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/ChangeLog 2007-01-31 20:23:45 UTC (rev 4418)
+++ branches/STABLE-BRANCH-1-4/g10/ChangeLog 2007-01-31 20:44:48 UTC (rev 4419)
@@ -1,5 +1,8 @@
2007-01-31 David Shaw <dshaw at jabberwocky.com>
+ * keyedit.c (sign_uids): Another multiple to single timestamp
+ operation.
+
* sign.c (write_plaintext_packet): Take timestamp from outside.
Change all callers.
(sign_file, clearsign_file, sign_symencrypt_file): Calculate one
Modified: branches/STABLE-BRANCH-1-4/g10/keyedit.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/keyedit.c 2007-01-31 20:23:45 UTC (rev 4418)
+++ branches/STABLE-BRANCH-1-4/g10/keyedit.c 2007-01-31 20:44:48 UTC (rev 4419)
@@ -517,6 +517,7 @@
PKT_public_key *primary_pk=NULL;
int select_all = !count_selected_uids(keyblock) || interactive;
int all_v3=1;
+ u32 timestamp=make_timestamp();
/* Are there any non-v3 sigs on this key already? */
if(PGP2)
@@ -544,7 +545,7 @@
u32 sk_keyid[2],pk_keyid[2];
char *p,*trust_regexp=NULL;
int force_v4=0,class=0,selfsig=0;
- u32 duration=0,timestamp=0;
+ u32 duration=0;
byte trust_depth=0,trust_value=0;
if(local || nonrevocable || trust ||
@@ -818,9 +819,7 @@
if(primary_pk->expiredate && !selfsig)
{
- u32 now=make_timestamp();
-
- if(primary_pk->expiredate<=now)
+ if(primary_pk->expiredate<=timestamp)
{
tty_printf(_("This key has expired!"));
@@ -850,14 +849,9 @@
"expire at the same time? (Y/n) "));
if(answer_is_yes_no_default(answer,1))
{
- /* This fixes the signature timestamp we're
- going to make as now. This is so the
- expiration date is exactly correct, and not
- a few seconds off (due to the time it takes
- to answer the questions, enter the
- passphrase, etc). */
- timestamp=now;
- duration=primary_pk->expiredate-now;
+ /* Set our signature expiration date to match
+ when the key is going to expire. */
+ duration=primary_pk->expiredate-timestamp;
force_v4=1;
}
More information about the Gnupg-commits
mailing list