diff options
author | Miroslav Suk <miroslav.suk@eset.cz> | 2018-03-22 09:20:43 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2018-03-27 20:12:34 +0200 |
commit | 98c03302fb7b855647aa14022f61f5fb272e514a (patch) | |
tree | d2c0a1f4856d423b2c41375227247852c521a409 /crypto/o_time.c | |
parent | c4eec78d221c6aa8d96d4d0ea9e7525490ffe222 (diff) |
o_time.c: use gmtime_s with MSVC
ts/ts_rsp_sign.c: change to OPENSSL_gmtime.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5720)
Diffstat (limited to 'crypto/o_time.c')
-rw-r--r-- | crypto/o_time.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/o_time.c b/crypto/o_time.c index b2fb38a541..30b81556f0 100644 --- a/crypto/o_time.c +++ b/crypto/o_time.c @@ -41,6 +41,10 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) if (gmtime_r(timer, result) == NULL) return NULL; ts = result; +#elif defined (OPENSSL_SYS_WINDOWS) && defined(_MSC_VER) && _MSC_VER >= 1400 + if (gmtime_s(result, timer)) + return NULL; + ts = result; #else ts = gmtime(timer); if (ts == NULL) |