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/ts | |
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/ts')
-rw-r--r-- | crypto/ts/ts_rsp_sign.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/ts/ts_rsp_sign.c b/crypto/ts/ts_rsp_sign.c index eac40abe3c..ed45c009bc 100644 --- a/crypto/ts/ts_rsp_sign.c +++ b/crypto/ts/ts_rsp_sign.c @@ -13,6 +13,7 @@ #include <openssl/objects.h> #include <openssl/ts.h> #include <openssl/pkcs7.h> +#include <openssl/crypto.h> #include "ts_lcl.h" static ASN1_INTEGER *def_serial_cb(struct TS_resp_ctx *, void *); @@ -986,7 +987,7 @@ static ASN1_GENERALIZEDTIME *TS_RESP_set_genTime_with_precision( unsigned precision) { time_t time_sec = (time_t)sec; - struct tm *tm = NULL; + struct tm *tm = NULL, tm_result; char genTime_str[17 + TS_MAX_CLOCK_PRECISION_DIGITS]; char *p = genTime_str; char *p_end = genTime_str + sizeof(genTime_str); @@ -994,7 +995,7 @@ static ASN1_GENERALIZEDTIME *TS_RESP_set_genTime_with_precision( if (precision > TS_MAX_CLOCK_PRECISION_DIGITS) goto err; - if ((tm = gmtime(&time_sec)) == NULL) + if ((tm = OPENSSL_gmtime(&time_sec, &tm_result)) == NULL) goto err; /* |