summaryrefslogtreecommitdiffstats
path: root/gnupgparse.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1999-03-22 16:00:36 +0000
committerThomas Roessler <roessler@does-not-exist.org>1999-03-22 16:00:36 +0000
commit5856b6fff90bdc15915d17ae4bf38716eb8cf10b (patch)
treeb8e7148e8a6bdac1b74b62473df592fc0ea2557c /gnupgparse.c
parentc278a285ca8ec6b761d9ebbcd97370ab76b48547 (diff)
PGP key creation time fix by Roland Rosenfeld.
Diffstat (limited to 'gnupgparse.c')
-rw-r--r--gnupgparse.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gnupgparse.c b/gnupgparse.c
index d4900a6e..ce8074fc 100644
--- a/gnupgparse.c
+++ b/gnupgparse.c
@@ -142,7 +142,23 @@ static pgp_key_t *parse_pub_line (char *buf, int *is_subkey, pgp_key_t *k)
}
case 6: /* timestamp (1998-02-28) */
+ {
+ char tstr[11];
+ struct tm time;
+ if (!p)
+ break;
+ time.tm_sec = 0;
+ time.tm_min = 0;
+ time.tm_hour = 12;
+ strncpy (tstr, p, 11);
+ tstr[4] = '\0';
+ time.tm_year = atoi (tstr)-1900;
+ tstr[7] = '\0';
+ time.tm_mon = (atoi (tstr+5))-1;
+ time.tm_mday = atoi (tstr+8);
+ k->gen_time = mutt_mktime (&time, 0);
break;
+ }
case 7: /* valid for n days */
break;
case 8: /* Local id */