aboutsummaryrefslogtreecommitdiff
path: root/apps/ca.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2008-10-07 22:55:27 +0000
committerDr. Stephen Henson <steve@openssl.org>2008-10-07 22:55:27 +0000
commit87d3a0cd9006f67fed0d3335d8b1c5ab94a26f8f (patch)
tree1e3f5000326191e669df486f0a0a471aed765df6 /apps/ca.c
parent1e369b375eaae43e2ec186f067905a0fab4bd6f1 (diff)
downloadopenssl-87d3a0cd9006f67fed0d3335d8b1c5ab94a26f8f.zip
openssl-87d3a0cd9006f67fed0d3335d8b1c5ab94a26f8f.tar.gz
openssl-87d3a0cd9006f67fed0d3335d8b1c5ab94a26f8f.tar.bz2
Experimental new date handling routines. These fix issues with X509_time_adj()
and should avoid any OS date limitations such as the year 2038 bug.
Diffstat (limited to 'apps/ca.c')
-rw-r--r--apps/ca.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/ca.c b/apps/ca.c
index 0967b34..13217a6 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -1399,7 +1399,7 @@ bad:
if (!tmptm) goto err;
X509_gmtime_adj(tmptm,0);
X509_CRL_set_lastUpdate(crl, tmptm);
- X509_gmtime_adj(tmptm,(crldays*24+crlhours)*60*60 + crlsec);
+ X509_time_adj_ex(tmptm, crldays, crlhours*60*60 + crlsec, NULL);
X509_CRL_set_nextUpdate(crl, tmptm);
ASN1_TIME_free(tmptm);
@@ -2006,7 +2006,7 @@ again2:
else ASN1_UTCTIME_set_string(X509_get_notBefore(ret),startdate);
if (enddate == NULL)
- X509_gmtime_adj(X509_get_notAfter(ret),(long)60*60*24*days);
+ X509_time_adj_ex(X509_get_notAfter(ret),days, 0, NULL);
else ASN1_UTCTIME_set_string(X509_get_notAfter(ret),enddate);
if (!X509_set_subject_name(ret,subject)) goto err;