diff options
author | Rob Percival <robpercival@google.com> | 2016-09-12 16:58:29 +0100 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-11-15 16:12:41 -0500 |
commit | f0f535e92b096db4a308ecc49ba7f0fd3f0f7945 (patch) | |
tree | ccea76396ec1263243481738bb1fb5b5817b8562 /crypto/ct | |
parent | e25233d99c30885bdf97bfb6df657e13ca2bf1da (diff) | |
download | openssl-f0f535e92b096db4a308ecc49ba7f0fd3f0f7945.zip openssl-f0f535e92b096db4a308ecc49ba7f0fd3f0f7945.tar.gz openssl-f0f535e92b096db4a308ecc49ba7f0fd3f0f7945.tar.bz2 |
Don't check for time() failing in CT_POLICY_EVAL_CTX_new
See https://github.com/openssl/openssl/pull/1554#issuecomment-246354677.
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.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/crypto/ct/ct_policy.c b/crypto/ct/ct_policy.c index d2f72c4..1bc2274 100644 --- a/crypto/ct/ct_policy.c +++ b/crypto/ct/ct_policy.c @@ -20,18 +20,14 @@ CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void) { CT_POLICY_EVAL_CTX *ctx = OPENSSL_zalloc(sizeof(CT_POLICY_EVAL_CTX)); - time_t epoch_time_in_s; if (ctx == NULL) { CTerr(CT_F_CT_POLICY_EVAL_CTX_NEW, ERR_R_MALLOC_FAILURE); return NULL; } - // Use the current time if available. - time(&epoch_time_in_s); - if (epoch_time_in_s != -1) - ctx->epoch_time_in_ms = epoch_time_in_s * 1000; - + // time(NULL) shouldn't ever fail, so don't bother checking for -1. + ctx->epoch_time_in_ms = time(NULL) * 1000; return ctx; } |