aboutsummaryrefslogtreecommitdiffstats
path: root/agent/cache.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2002-05-14 16:51:00 +0000
committerWerner Koch <[email protected]>2002-05-14 16:51:00 +0000
commitc7ceb874c28c0cae77870629f492d61340384944 (patch)
treec01b633e889a6a2b3e32d56bf4a5ccb492602863 /agent/cache.c
parent* errors.h: Added STARUS_EXPSIG and STATUS_EXPKEYSIG. (diff)
downloadgnupg-c7ceb874c28c0cae77870629f492d61340384944.tar.gz
gnupg-c7ceb874c28c0cae77870629f492d61340384944.zip
sm/
* gpgsm.c: New option --faked-system-time * sign.c (gpgsm_sign): And use it here. * certpath.c (gpgsm_validate_path): Ditto. common/ * gettime.c: New. agent/ * cache.c (housekeeping, agent_put_cache): Use our time() wrapper. / * doc/: New * configure.ac, Makefile.am: Added doc/
Diffstat (limited to 'agent/cache.c')
-rw-r--r--agent/cache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/agent/cache.c b/agent/cache.c
index 4819ad197..ed9c8cfd9 100644
--- a/agent/cache.c
+++ b/agent/cache.c
@@ -82,7 +82,7 @@ static void
housekeeping (void)
{
ITEM r, rprev;
- time_t current = time (NULL);
+ time_t current = gnupg_get_time ();
/* first expire the actual data */
for (r=thecache; r; r = r->next)
@@ -170,7 +170,7 @@ agent_put_cache (const char *key, const char *data, int ttl)
}
if (data)
{
- r->created = r->accessed = time (NULL);
+ r->created = r->accessed = gnupg_get_time ();
r->ttl = ttl;
r->pw = new_data (data, strlen (data)+1);
if (!r->pw)
@@ -185,7 +185,7 @@ agent_put_cache (const char *key, const char *data, int ttl)
else
{
strcpy (r->key, key);
- r->created = r->accessed = time (NULL);
+ r->created = r->accessed = gnupg_get_time ();
r->ttl = ttl;
r->pw = new_data (data, strlen (data)+1);
if (!r->pw)
@@ -223,7 +223,7 @@ agent_get_cache (const char *key)
{
/* put_cache does only put strings into the cache, so we
don't need the lengths */
- r->accessed = time (NULL);
+ r->accessed = gnupg_get_time ();
if (DBG_CACHE)
log_debug ("... hit\n");
return r->pw->data;