aboutsummaryrefslogtreecommitdiffstats
path: root/agent/genkey.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2011-04-12 16:20:46 +0000
committerWerner Koch <[email protected]>2011-04-12 16:20:46 +0000
commitf8c5395fbd24b9811807d7601e22b38af9f5126c (patch)
treeae11a3ad0bb041b5b31f115ec91e16c2c0e383ad /agent/genkey.c
parentAdded PASSWD --preset. (diff)
downloadgnupg-f8c5395fbd24b9811807d7601e22b38af9f5126c.tar.gz
gnupg-f8c5395fbd24b9811807d7601e22b38af9f5126c.zip
Use macros for the 120 and 900s cache TTLs.
Diffstat (limited to 'agent/genkey.c')
-rw-r--r--agent/genkey.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/agent/genkey.c b/agent/genkey.c
index 95e0a64ce..30e698f77 100644
--- a/agent/genkey.c
+++ b/agent/genkey.c
@@ -432,7 +432,7 @@ agent_genkey (ctrl_t ctrl, const char *cache_nonce,
if (cache_nonce
&& !no_protection
&& !agent_put_cache (cache_nonce, CACHE_MODE_NONCE,
- passphrase, 900 /*seconds*/))
+ passphrase, CACHE_TTL_OPT_PRESET))
agent_write_status (ctrl, "CACHE_NONCE", cache_nonce, NULL);
if (preset && !no_protection)
{
@@ -441,7 +441,8 @@ agent_genkey (ctrl_t ctrl, const char *cache_nonce,
if (gcry_pk_get_keygrip (s_private, grip))
{
bin2hex(grip, 20, hexgrip);
- rc = agent_put_cache (hexgrip, CACHE_MODE_ANY, passphrase, 900);
+ rc = agent_put_cache (hexgrip, CACHE_MODE_ANY, passphrase,
+ CACHE_TTL_OPT_PRESET);
}
}
}