aboutsummaryrefslogtreecommitdiffstats
path: root/gpgme/keylist.c
diff options
context:
space:
mode:
Diffstat (limited to 'gpgme/keylist.c')
-rw-r--r--gpgme/keylist.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/gpgme/keylist.c b/gpgme/keylist.c
index e7c211e5..3fbabaea 100644
--- a/gpgme/keylist.c
+++ b/gpgme/keylist.c
@@ -1,6 +1,6 @@
/* keylist.c - key listing
* Copyright (C) 2000 Werner Koch (dd9jn)
- * Copyright (C) 2001, 2002 g10 Code GmbH
+ * Copyright (C) 2001, 2002, 2003 g10 Code GmbH
*
* This file is part of GPGME.
*
@@ -118,16 +118,6 @@ keylist_status_handler (GpgmeCtx ctx, GpgmeStatusCode code, char *args)
}
-static time_t
-parse_timestamp (char *p)
-{
- if (!*p)
- return 0;
-
- return (time_t)strtoul (p, NULL, 10);
-}
-
-
static void
set_mainkey_trust_info (GpgmeKey key, const char *s)
{
@@ -389,10 +379,10 @@ keylist_colon_handler (GpgmeCtx ctx, char *line)
strcpy (key->keys.keyid, p);
break;
case 6: /* timestamp (seconds) */
- key->keys.timestamp = parse_timestamp (p);
+ key->keys.timestamp = _gpgme_parse_timestamp (p);
break;
case 7: /* expiration time (seconds) */
- key->keys.expires_at = parse_timestamp (p);
+ key->keys.expires_at = _gpgme_parse_timestamp (p);
break;
case 8: /* X.509 serial number */
if (rectype == RT_CRT || rectype == RT_CRS)
@@ -444,10 +434,10 @@ keylist_colon_handler (GpgmeCtx ctx, char *line)
strcpy (sk->keyid, p);
break;
case 6: /* timestamp (seconds) */
- sk->timestamp = parse_timestamp (p);
+ sk->timestamp = _gpgme_parse_timestamp (p);
break;
case 7: /* expiration time (seconds) */
- sk->expires_at = parse_timestamp (p);
+ sk->expires_at = _gpgme_parse_timestamp (p);
break;
case 8: /* reserved (LID) */
break;