aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-05-14 06:49:37 +0000
committerWerner Koch <[email protected]>2014-06-03 06:05:50 +0000
commit3c3d1ab35d17bce46dac8f806a8ce2dc90ac06ee (patch)
tree2d123d300d148eb62dcc2f5e1126016ff038d100
parentgpg: Graceful skip reading of corrupt MPIs. (diff)
downloadgnupg-3c3d1ab35d17bce46dac8f806a8ce2dc90ac06ee.tar.gz
gnupg-3c3d1ab35d17bce46dac8f806a8ce2dc90ac06ee.zip
gpg: Fix glitch entering a full expiration time.
* g10/keygen.c (ask_expire_interval): Get the current time after the prompt. -- This almost avoid that an entered full ISO timestamp is not used as given but off by the time the user required to enter the timestamp. GnuPG-bug-id: 1639
-rw-r--r--g10/keygen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index ad6bd73e6..a786beb08 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -1949,7 +1949,7 @@ ask_expire_interval(int object,const char *def_expire)
answer = NULL;
for(;;)
{
- u32 curtime=make_timestamp();
+ u32 curtime;
xfree(answer);
if(object==0)
@@ -1973,6 +1973,7 @@ ask_expire_interval(int object,const char *def_expire)
}
cpr_kill_prompt();
trim_spaces(answer);
+ curtime = make_timestamp ();
interval = parse_expire_string( answer );
if( interval == (u32)-1 )
{