diff options
Diffstat (limited to 'crypto/ts')
-rw-r--r-- | crypto/ts/Makefile | 3 | ||||
-rw-r--r-- | crypto/ts/ts_rsp_sign.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/crypto/ts/Makefile b/crypto/ts/Makefile index cf991efe4641..4a3c0f0017e8 100644 --- a/crypto/ts/Makefile +++ b/crypto/ts/Makefile @@ -217,7 +217,8 @@ ts_rsp_sign.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h ts_rsp_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h ts_rsp_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ts.h ts_rsp_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -ts_rsp_sign.o: ../../include/openssl/x509v3.h ../cryptlib.h ts_rsp_sign.c +ts_rsp_sign.o: ../../include/openssl/x509v3.h ../cryptlib.h ../o_time.h +ts_rsp_sign.o: ts_rsp_sign.c ts_rsp_utils.o: ../../e_os.h ../../include/openssl/asn1.h ts_rsp_utils.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h ts_rsp_utils.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h diff --git a/crypto/ts/ts_rsp_sign.c b/crypto/ts/ts_rsp_sign.c index db6ce3241f73..d55e903e836a 100644 --- a/crypto/ts/ts_rsp_sign.c +++ b/crypto/ts/ts_rsp_sign.c @@ -4,7 +4,7 @@ * 2002. */ /* ==================================================================== - * Copyright (c) 2006 The OpenSSL Project. All rights reserved. + * Copyright (c) 2006-2018 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -58,6 +58,7 @@ */ #include "cryptlib.h" +#include "o_time.h" #if defined(OPENSSL_SYS_UNIX) # include <sys/time.h> @@ -948,6 +949,7 @@ static ASN1_GENERALIZEDTIME { time_t time_sec = (time_t)sec; struct tm *tm = NULL; + struct tm result = {0}; char genTime_str[17 + TS_MAX_CLOCK_PRECISION_DIGITS]; char *p = genTime_str; char *p_end = genTime_str + sizeof(genTime_str); @@ -955,7 +957,7 @@ static ASN1_GENERALIZEDTIME if (precision > TS_MAX_CLOCK_PRECISION_DIGITS) goto err; - if (!(tm = gmtime(&time_sec))) + if (!(tm = OPENSSL_gmtime(&time_sec, &result))) goto err; /* |