X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fasn1%2Fa_utctm.c;h=3ae7432cb20aef77a7c4ecebb37ea2dcdd2215ba;hb=2aa5dac48ff779b8dab1b68a3617731816649af8;hp=0a5a8d27536034d86d67b0a83812a6d0b4371c4a;hpb=bc36ee6227517edae802bcb0da68d4f04fe1fb5e;p=oweals%2Fopenssl.git diff --git a/crypto/asn1/a_utctm.c b/crypto/asn1/a_utctm.c index 0a5a8d2753..3ae7432cb2 100644 --- a/crypto/asn1/a_utctm.c +++ b/crypto/asn1/a_utctm.c @@ -58,7 +58,7 @@ #include #include -#ifdef OPENSSL_SYS_VMS +#ifdef VMS #include #include #include @@ -66,7 +66,12 @@ #include "cryptlib.h" #include -#if 0 +ASN1_UTCTIME *ASN1_UTCTIME_new(void) +{ return M_ASN1_UTCTIME_new(); } + +void ASN1_UTCTIME_free(ASN1_UTCTIME *x) +{ M_ASN1_UTCTIME_free(x); } + int i2d_ASN1_UTCTIME(ASN1_UTCTIME *a, unsigned char **pp) { #ifndef CHARSET_EBCDIC @@ -114,8 +119,6 @@ err: return(NULL); } -#endif - int ASN1_UTCTIME_check(ASN1_UTCTIME *d) { static int min[8]={ 0, 1, 1, 0, 0, 0, 0, 0}; @@ -179,7 +182,6 @@ int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, char *str) { ASN1_STRING_set((ASN1_STRING *)s, (unsigned char *)str,t.length); - s->type = V_ASN1_UTCTIME; } return(1); } @@ -191,7 +193,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) { char *p; struct tm *ts; -#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__) +#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) struct tm data; #endif @@ -201,13 +203,13 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) if (s == NULL) return(NULL); -#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__) +#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_DARWIN) gmtime_r(&t,&data); /* should return &data, but doesn't on some systems, so we don't even look at the return value */ ts=&data; #else ts=gmtime(&t); #endif -#ifdef OPENSSL_SYS_VMS +#ifdef VMS if (ts == NULL) { static $DESCRIPTOR(tabnam,"LNM$DCL_LOGICAL"); @@ -284,7 +286,7 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t) t -= offset*60; /* FIXME: may overflow in extreme cases */ -#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__) +#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_DARWIN) { struct tm data; gmtime_r(&t, &data); tm = &data; } #else tm = gmtime(&t);