diff options
| author | deraadt <> | 2014-04-18 23:42:00 +0000 |
|---|---|---|
| committer | deraadt <> | 2014-04-18 23:42:00 +0000 |
| commit | 9711ef8d33453c62ae27f8ead4f6eeb7cdae136b (patch) | |
| tree | d34f0513fa7ea1f0d59700feaf05db49838ca750 /src/lib/libcrypto/o_time.c | |
| parent | d40a53aa45a5cf89c4956c37762578dad08ba87d (diff) | |
| download | openbsd-9711ef8d33453c62ae27f8ead4f6eeb7cdae136b.tar.gz openbsd-9711ef8d33453c62ae27f8ead4f6eeb7cdae136b.tar.bz2 openbsd-9711ef8d33453c62ae27f8ead4f6eeb7cdae136b.zip | |
OPENSSL_gmtime() is really just gmtime_r(); ok guenther
Diffstat (limited to 'src/lib/libcrypto/o_time.c')
| -rw-r--r-- | src/lib/libcrypto/o_time.c | 10 |
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 | ||
| 66 | struct tm * | ||
| 67 | OPENSSL_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) && |
