summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/o_time.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/o_time.c')
-rw-r--r--src/lib/libcrypto/o_time.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/lib/libcrypto/o_time.c b/src/lib/libcrypto/o_time.c
index 83028356b9..000372d35b 100644
--- a/src/lib/libcrypto/o_time.c
+++ b/src/lib/libcrypto/o_time.c
@@ -63,12 +63,6 @@
63#include <string.h> 63#include <string.h>
64#include "o_time.h" 64#include "o_time.h"
65 65
66struct tm *
67OPENSSL_gmtime(const time_t *timer, struct tm *result)
68{
69 return gmtime_r(timer, result);
70}
71
72/* Take a tm structure and add an offset to it. This avoids any OS issues 66/* Take a tm structure and add an offset to it. This avoids any OS issues
73 * with restricted date types and overflows which cause the year 2038 67 * with restricted date types and overflows which cause the year 2038
74 * problem. 68 * problem.
@@ -194,8 +188,8 @@ check_time(long offset)
194 time_t t1, t2; 188 time_t t1, t2;
195 time(&t1); 189 time(&t1);
196 t2 = t1 + offset; 190 t2 = t1 + offset;
197 OPENSSL_gmtime(&t2, &tm2); 191 gmtime_r(&t2, &tm2);
198 OPENSSL_gmtime(&t1, &tm1); 192 gmtime_r(&t1, &tm1);
199 OPENSSL_gmtime_adj(&tm1, 0, offset); 193 OPENSSL_gmtime_adj(&tm1, 0, offset);
200 if ((tm1.tm_year == tm2.tm_year) && 194 if ((tm1.tm_year == tm2.tm_year) &&
201 (tm1.tm_mon == tm2.tm_mon) && 195 (tm1.tm_mon == tm2.tm_mon) &&