aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog5
-rw-r--r--g10/keygen.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index f2cf34445..01d2242d5 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,8 @@
+Thu Oct 28 16:08:20 CEST 1999 Werner Koch <[email protected]>
+
+ * keygen.c (ask_expire_interval): Print a warning for systems
+ with a signed 32 time_t if the exiration time is beyoind 2038.
+
Fri Oct 8 20:40:50 CEST 1999 Werner Koch <[email protected]>
* ringedit.c (enum_keyblocks): The last fix way really stupid;
diff --git a/g10/keygen.c b/g10/keygen.c
index ceff09d10..415b5b25f 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -540,7 +540,7 @@ ask_expire_interval(void)
}
else if( (mult=check_valid_days(answer)) ) {
valid_days = atoi(answer) * mult;
- if( valid_days < 0 || valid_days > 32767 )
+ if( valid_days < 0 || valid_days > 39447 )
valid_days = 0;
}
else {
@@ -556,7 +556,10 @@ ask_expire_interval(void)
interval = valid_days * 86400L;
/* print the date when the key expires */
tty_printf(_("Key expires at %s\n"),
- asctimestamp(curtime + interval ) );
+ asctimestamp((ulong)(curtime + interval) ) );
+ if( (time_t)((ulong)(curtime+interval)) < 0 )
+ tty_printf(_("Your system can't display dates beyond 2036.\n"
+ "However, it will be correctly handled up to 2106.\n"));
}
if( cpr_enabled() || cpr_get_answer_is_yes("keygen.valid.okay",