summaryrefslogtreecommitdiffstats
path: root/crypto/ct
diff options
context:
space:
mode:
authorRob Percival <robpercival@google.com>2016-09-14 21:25:01 +0200
committerRich Salz <rsalz@openssl.org>2016-11-15 22:12:41 +0100
commit5e08606619c0b0e065f1ffa12ce6411f321ed174 (patch)
tree73b92322af8b7f72c36cffef04861180518a10b0 /crypto/ct
parentBy default, allow SCT timestamps to be up to 5 minutes in the future (diff)
downloadopenssl-5e08606619c0b0e065f1ffa12ce6411f321ed174.tar.xz
openssl-5e08606619c0b0e065f1ffa12ce6411f321ed174.zip
Cast time_t to uint64_t before converting to milliseconds in ct_policy.c
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1554)
Diffstat (limited to 'crypto/ct')
-rw-r--r--crypto/ct/ct_policy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/ct/ct_policy.c b/crypto/ct/ct_policy.c
index adee331366..0f27443971 100644
--- a/crypto/ct/ct_policy.c
+++ b/crypto/ct/ct_policy.c
@@ -33,7 +33,9 @@ CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void)
}
// time(NULL) shouldn't ever fail, so don't bother checking for -1.
- ctx->epoch_time_in_ms = (time(NULL) + SCT_CLOCK_DRIFT_TOLERANCE) * 1000;
+ ctx->epoch_time_in_ms = (uint64_t)(time(NULL) + SCT_CLOCK_DRIFT_TOLERANCE) *
+ 1000;
+
return ctx;
}