On Aug 11 12:29, Joe Gluck wrote: > The OPENSSL_gmtime in o_time.c (that gets called from other places like > ASN1_UTCTIME_cmp_time_t in a_utctm.c) does not use the safe version of > gmtime in lots of platforms including: > OPENSSL_SYS_WIN32 > OPENSSL_SYS_OS2 > __CYGWIN32__ > OPENSSL_SYS_MACOSX > OPENSSL_SYS_SUNOS > This could cause problems in multi-thread environments, why not use mutexes > to wrap the gmtime and memcpy, like other places in the library?
Please drop Cygwin from this list since it has gmtime_r for ages. I'm sorry that I missed that. See patch below. Corinna --- crypto/o_time.c.orig 2006-08-13 10:23:23.815738500 +0200 +++ crypto/o_time.c 2006-08-13 10:23:34.211600500 +0200 @@ -73,7 +73,7 @@ struct tm *OPENSSL_gmtime(const time_t * { struct tm *ts = NULL; -#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_OS2) && !defined(__CYGWIN32__) && (!defined(OPENSSL_SYS_VMS) || defined(gmtime_r)) && !defined(OPENSSL_SYS_MACOSX) && !defined(OPENSSL_SYS_SUNOS) +#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_OS2) && (!defined(OPENSSL_SYS_VMS) || defined(gmtime_r)) && !defined(OPENSSL_SYS_MACOSX) && !defined(OPENSSL_SYS_SUNOS) /* should return &data, but doesn't on some systems, so we don't even look at the return value */ gmtime_r(timer,result); -- Corinna Vinschen Cygwin Project Co-Leader Red Hat ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager [EMAIL PROTECTED]