X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=crypto%2Fasn1%2Fa_utctm.c;h=39b79109720210e85e6b3e6a7167abff05727120;hb=7ab1a391814e588506fe37c162a7cc760a422fd6;hp=d381c9e0d1e6e8807774479da04681b6f1194cb0;hpb=4f7068c165b84f8f788a5fdbd2a1ef4253e44e9c;p=openssl.git diff --git a/crypto/asn1/a_utctm.c b/crypto/asn1/a_utctm.c index d381c9e0d1..39b7910972 100644 --- a/crypto/asn1/a_utctm.c +++ b/crypto/asn1/a_utctm.c @@ -58,20 +58,15 @@ #include #include -#ifdef VMS +#include "cryptlib.h" +#include +#ifdef OPENSSL_SYS_VMS #include #include #include #endif -#include "cryptlib.h" -#include - -ASN1_UTCTIME *ASN1_UTCTIME_new(void) -{ return M_ASN1_UTCTIME_new(); } - -void ASN1_UTCTIME_free(ASN1_UTCTIME *x) -{ M_ASN1_UTCTIME_free(x); } +#if 0 int i2d_ASN1_UTCTIME(ASN1_UTCTIME *a, unsigned char **pp) { #ifndef CHARSET_EBCDIC @@ -119,6 +114,8 @@ err: return(NULL); } +#endif + int ASN1_UTCTIME_check(ASN1_UTCTIME *d) { static int min[8]={ 0, 1, 1, 0, 0, 0, 0, 0}; @@ -182,6 +179,7 @@ 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); } @@ -193,7 +191,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) { char *p; struct tm *ts; -#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) +#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__) struct tm data; #endif @@ -203,13 +201,13 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) if (s == NULL) return(NULL); -#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) +#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__) 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 VMS +#ifdef OPENSSL_SYS_VMS if (ts == NULL) { static $DESCRIPTOR(tabnam,"LNM$DCL_LOGICAL"); @@ -286,7 +284,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(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) +#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__) { struct tm data; gmtime_r(&t, &data); tm = &data; } #else tm = gmtime(&t);