From 42b7eefbeec5f61a173ad550f5c578d0652781aa Mon Sep 17 00:00:00 2001 From: toddouska Date: Tue, 25 Oct 2011 12:30:49 -0700 Subject: [PATCH] for cert gen make start day yesterady for bad clocks --- configure.ac | 2 +- ctaocrypt/src/asn.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f30b0da97..3cfe33c67 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ # # -AC_INIT([cyassl],[2.0.0rc3],[http://www.yassl.com]) +AC_INIT([cyassl],[2.0.0rc3b],[http://www.yassl.com]) AC_CONFIG_AUX_DIR(config) diff --git a/ctaocrypt/src/asn.c b/ctaocrypt/src/asn.c index fd5f2eec0..261e74d57 100644 --- a/ctaocrypt/src/asn.c +++ b/ctaocrypt/src/asn.c @@ -2640,6 +2640,10 @@ static int SetValidity(byte* output, int daysValid) before[0] = ASN_GENERALIZED_TIME; beforeSz = SetLength(ASN_GEN_TIME_SZ, before + 1) + 1; /* gen tag */ + /* subtract 1 day for more compliance */ + local.tm_mday -= 1; + mktime(&local); + /* adjust */ local.tm_year += 1900; local.tm_mon += 1;