--- ./apps/ca.c.orig	2010-03-13 14:22:41.000000000 -0500
+++ ./apps/ca.c	2012-01-23 14:38:29.000000000 -0500
@@ -1370,6 +1370,22 @@
 				goto err;
 				}

+		if (strcmp(startdate,"today") != 0 && !ASN1_UTCTIME_set_string(NULL,startdate))
+			{
+			BIO_printf(bio_err,"start date is invalid, it should be YYMMDDHHMMSSZ\n");
+			goto err;
+			}
+		if (enddate)
+			{
+			crldays = 1;
+			crlhours = 0;
+			if (!ASN1_UTCTIME_set_string(NULL,enddate))
+				{
+				BIO_printf(bio_err,"end date is invalid, it should be YYMMDDHHMMSSZ\n");
+				goto err;
+				}
+			}
+
 		if (!crldays && !crlhours)
 			{
 			if (!NCONF_get_number(conf,section,
@@ -1398,6 +1414,11 @@

 		ASN1_TIME_free(tmptm);

+		if (strcmp(startdate,"today") != 0)
+			ASN1_UTCTIME_set_string(X509_CRL_get_lastUpdate(crl),startdate);
+		if (enddate)
+			ASN1_UTCTIME_set_string(X509_CRL_get_nextUpdate(crl),enddate);
+
 		for (i=0; i<sk_num(db->db->data); i++)
 			{
 			pp=(const char **)sk_value(db->db->data,i);
