for cert gen make start day yesterady for bad clocks

This commit is contained in:
toddouska
2011-10-25 12:30:49 -07:00
parent 93e161245f
commit 42b7eefbee
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -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;