summaryrefslogtreecommitdiffstats
path: root/apps/ocsp.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-01-14 00:25:25 +0000
committerDr. Stephen Henson <steve@openssl.org>2016-01-14 02:59:06 +0000
commit9aa00b187a65b1f30789d6274ec31ea86efe7973 (patch)
tree831beb8973464d44f3b90d296afba8d23b0f187e /apps/ocsp.c
parentb098dcae66433efc4c073ca2cc5fc64cdf8a613e (diff)
To avoid possible time_t overflow use X509_time_adj_ex()
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Diffstat (limited to 'apps/ocsp.c')
-rw-r--r--apps/ocsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/ocsp.c b/apps/ocsp.c
index ceda592de9..0c41c4d5de 100644
--- a/apps/ocsp.c
+++ b/apps/ocsp.c
@@ -914,7 +914,7 @@ static void make_ocsp_response(OCSP_RESPONSE **resp, OCSP_REQUEST *req,
bs = OCSP_BASICRESP_new();
thisupd = X509_gmtime_adj(NULL, 0);
if (ndays != -1)
- nextupd = X509_gmtime_adj(NULL, nmin * 60 + ndays * 3600 * 24);
+ nextupd = X509_time_adj_ex(NULL, ndays, nmin * 60, NULL);
/* Examine each certificate id in the request */
for (i = 0; i < id_count; i++) {