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
This commit is contained in:
Werner Koch 2014-05-14 08:49:37 +02:00
parent 4aeb02562c
commit b2945c451d
1 changed files with 2 additions and 1 deletions

View File

@ -2302,7 +2302,7 @@ ask_expire_interval(int object,const char *def_expire)
answer = NULL;
for(;;)
{
u32 curtime=make_timestamp();
u32 curtime;
xfree(answer);
if(object==0)
@ -2326,6 +2326,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 )
{