aboutsummaryrefslogtreecommitdiffstats
path: root/src/pki/commands/issue.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2011-12-23 16:33:24 +0100
committerTobias Brunner <tobias@strongswan.org>2011-12-23 16:33:24 +0100
commit20d752b4ff582e61a27d0aa8b42222f587665c92 (patch)
treefa0cc4f859def5ac41e99a8b2c30a6dfcda06b54 /src/pki/commands/issue.c
parent1267127c114aa6d7c1507d1da4a1af3954c42cde (diff)
downloadstrongswan-20d752b4ff582e61a27d0aa8b42222f587665c92.tar.bz2
strongswan-20d752b4ff582e61a27d0aa8b42222f587665c92.tar.xz
pki: Avoid integer overflow when calculating certificate lifetimes.
This only works properly if sizeof(time_t) > 4.
Diffstat (limited to 'src/pki/commands/issue.c')
-rw-r--r--src/pki/commands/issue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pki/commands/issue.c b/src/pki/commands/issue.c
index 6a5686d92..20163edf2 100644
--- a/src/pki/commands/issue.c
+++ b/src/pki/commands/issue.c
@@ -67,11 +67,11 @@ static int issue()
char *error = NULL, *keyid = NULL;
identification_t *id = NULL;
linked_list_t *san, *cdps, *ocsp, *permitted, *excluded, *policies, *mappings;
- int lifetime = 1095;
int pathlen = X509_NO_CONSTRAINT, inhibit_any = X509_NO_CONSTRAINT;
int inhibit_mapping = X509_NO_CONSTRAINT, require_explicit = X509_NO_CONSTRAINT;
chunk_t serial = chunk_empty;
chunk_t encoding = chunk_empty;
+ time_t lifetime = 1095;
time_t not_before, not_after;
x509_flag_t flags = 0;
x509_t *x509;