summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libssl/src/crypto/asn1/a_gentm.c2
-rw-r--r--lib/libssl/src/crypto/asn1/a_time.c2
-rw-r--r--lib/libssl/src/crypto/asn1/a_utctm.c4
-rw-r--r--lib/libssl/src/crypto/o_time.c10
-rw-r--r--lib/libssl/src/crypto/o_time.h1
5 files changed, 6 insertions, 13 deletions
diff --git a/lib/libssl/src/crypto/asn1/a_gentm.c b/lib/libssl/src/crypto/asn1/a_gentm.c
index 56f89924241..856aaf0c77d 100644
--- a/lib/libssl/src/crypto/asn1/a_gentm.c
+++ b/lib/libssl/src/crypto/asn1/a_gentm.c
@@ -222,7 +222,7 @@ ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s, time_t t, int offset_day,
if (s == NULL)
return (NULL);
- ts = OPENSSL_gmtime(&t, &data);
+ ts = gmtime_r(&t, &data);
if (ts == NULL)
return (NULL);
diff --git a/lib/libssl/src/crypto/asn1/a_time.c b/lib/libssl/src/crypto/asn1/a_time.c
index 13fd3245171..f3f28369f41 100644
--- a/lib/libssl/src/crypto/asn1/a_time.c
+++ b/lib/libssl/src/crypto/asn1/a_time.c
@@ -94,7 +94,7 @@ ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
struct tm *ts;
struct tm data;
- ts=OPENSSL_gmtime(&t,&data);
+ ts=gmtime_r(&t,&data);
if (ts == NULL) {
ASN1err(ASN1_F_ASN1_TIME_ADJ, ASN1_R_ERROR_GETTING_TIME);
return NULL;
diff --git a/lib/libssl/src/crypto/asn1/a_utctm.c b/lib/libssl/src/crypto/asn1/a_utctm.c
index d8135d04572..a2325f25252 100644
--- a/lib/libssl/src/crypto/asn1/a_utctm.c
+++ b/lib/libssl/src/crypto/asn1/a_utctm.c
@@ -181,7 +181,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
if (s == NULL)
return(NULL);
- ts=OPENSSL_gmtime(&t, &data);
+ ts=gmtime_r(&t, &data);
if (ts == NULL)
return(NULL);
@@ -232,7 +232,7 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
t -= offset*60; /* FIXME: may overflow in extreme cases */
- tm = OPENSSL_gmtime(&t, &data);
+ tm = gmtime_r(&t, &data);
#define return_cmp(a,b) if ((a)<(b)) return -1; else if ((a)>(b)) return 1
year = g2(s->data);
diff --git a/lib/libssl/src/crypto/o_time.c b/lib/libssl/src/crypto/o_time.c
index 83028356b91..000372d35b5 100644
--- a/lib/libssl/src/crypto/o_time.c
+++ b/lib/libssl/src/crypto/o_time.c
@@ -63,12 +63,6 @@
#include <string.h>
#include "o_time.h"
-struct tm *
-OPENSSL_gmtime(const time_t *timer, struct tm *result)
-{
- return gmtime_r(timer, result);
-}
-
/* Take a tm structure and add an offset to it. This avoids any OS issues
* with restricted date types and overflows which cause the year 2038
* problem.
@@ -194,8 +188,8 @@ check_time(long offset)
time_t t1, t2;
time(&t1);
t2 = t1 + offset;
- OPENSSL_gmtime(&t2, &tm2);
- OPENSSL_gmtime(&t1, &tm1);
+ gmtime_r(&t2, &tm2);
+ gmtime_r(&t1, &tm1);
OPENSSL_gmtime_adj(&tm1, 0, offset);
if ((tm1.tm_year == tm2.tm_year) &&
(tm1.tm_mon == tm2.tm_mon) &&
diff --git a/lib/libssl/src/crypto/o_time.h b/lib/libssl/src/crypto/o_time.h
index e391da75087..4f8288f5d58 100644
--- a/lib/libssl/src/crypto/o_time.h
+++ b/lib/libssl/src/crypto/o_time.h
@@ -61,7 +61,6 @@
#include <time.h>
-struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result);
int OPENSSL_gmtime_adj(struct tm *tm, int offset_day, long offset_sec);
#endif