[exim-dev] [Bug 1526] Solaris 11: error compiling since exim 4.83 - Undefined symbol timegm first referenced in file tls.o

2014-11-14 Thread Jeremy Harris
--- You are receiving this mail because: ---
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1526

Jeremy Harris jgh146...@wizmail.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED




--- Comment #6 from Jeremy Harris jgh146...@wizmail.org  2014-11-14 09:54:47 
---
The fix for bug 1541 removed the use of timegm().


-- 
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 1526] Solaris 11: error compiling since exim 4.83 - Undefined symbol timegm first referenced in file tls.o

2014-10-10 Thread James C . McPherson
--- You are receiving this mail because: ---
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1526




--- Comment #4 from James C. McPherson james.mcpher...@oracle.com  2014-10-08 
02:34:07 ---
Unfortunately, the proposed fix is very much not thread safe.

I observe, also, that the linux manpage for timegm() includes this note:
http://man7.org/linux/man-pages/man3/timegm.3.html


CONFORMING TO top

   These functions are nonstandard GNU extensions that are also present
   on the BSDs.  Avoid their use; 


I have a better suggestion planned, but I need to test it before offering
it as a patch.


-- 
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 1526] Solaris 11: error compiling since exim 4.83 - Undefined symbol timegm first referenced in file tls.o

2014-10-08 Thread Jeremy Harris
--- You are receiving this mail because: ---
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1526




--- Comment #5 from Jeremy Harris jgh146...@wizmail.org  2014-10-08 09:13:10 
---
Exim does not use threads, and nowhere pays attention to being thread-safe


-- 
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 1526] Solaris 11: error compiling since exim 4.83 - Undefined symbol timegm first referenced in file tls.o

2014-10-07 Thread Jeremy Harris
--- You are receiving this mail because: ---
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1526

Jeremy Harris jgh146...@wizmail.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED




-- 
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 1526] Solaris 11: error compiling since exim 4.83 - Undefined symbol timegm first referenced in file tls.o

2014-10-07 Thread Jeremy Harris
--- You are receiving this mail because: ---
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1526




--- Comment #3 from Jeremy Harris jgh146...@wizmail.org  2014-10-07 15:22:23 
---
Created an attachment (id=758)
 -- (http://bugs.exim.org/attachment.cgi?id=758)
proposed fix


-- 
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


Re: [exim-dev] [Bug 1526] Solaris 11: error compiling since exim 4.83 - Undefined symbol timegm first referenced in file tls.o

2014-09-09 Thread Viktor Dukhovni
On Tue, Sep 09, 2014 at 12:16:58AM +0100, Phil Pennock wrote:

 --- Comment #1 from Phil Pennock p...@exim.org  2014-09-09 00:16:57 ---
 The file src/tlscert-openssl.c has this:
 
 105 static uschar *
 106 bio_string_time_to_int(BIO * bp, int len)
 107 {
 108 uschar * cp = US;
 109 struct tm t;
 110 len = len  0 ? (int) BIO_get_mem_data(bp, cp) : 0;
 111 /*XXX %Z might be glibc-specific? */
 112 (void) strptime(CS cp, %b%t%e%t%T%t%Y%t%Z, t);
 113 BIO_free(bp);
 114 /*XXX timegm might not be portable? */
 115 return string_sprintf(%u, (unsigned) timegm(t));
 116 }
 
 Hey Jeremy: you're right, it's not.  :)

It is also unsafe to assume that time_t fits without truncation
into an int, or that the time is unsigned.  It should be cast to
intmax_t, and use %jd as the format.

It is also not strictly safe to assume that time_t can represent
all ASN1_TIME values, since Linux unlike BSD has 32 bit time_t in
32-bit compilation environments.  However struct tm, can easily
represent distant dates.  OpenSSL has internal functions to covert
between tm and (julian day, seconds) which is safe from overflow,
and can be converted to intmax_t reasonably safely on platforms that
have some kind of 64-bit type.

How important is it for Exim to export certificate validity times
as an integral type of seconds since the epoch?

-- 
Viktor.

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 1526] Solaris 11: error compiling since exim 4.83 - Undefined symbol timegm first referenced in file tls.o

2014-09-08 Thread Phil Pennock
--- You are receiving this mail because: ---
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1526

Phil Pennock p...@exim.org changed:

   What|Removed |Added

 AssignedTo|p...@exim.org|jgh146...@wizmail.org




--- Comment #1 from Phil Pennock p...@exim.org  2014-09-09 00:16:57 ---
The file src/tlscert-openssl.c has this:

105 static uschar *
106 bio_string_time_to_int(BIO * bp, int len)
107 {
108 uschar * cp = US;
109 struct tm t;
110 len = len  0 ? (int) BIO_get_mem_data(bp, cp) : 0;
111 /*XXX %Z might be glibc-specific? */
112 (void) strptime(CS cp, %b%t%e%t%T%t%Y%t%Z, t);
113 BIO_free(bp);
114 /*XXX timegm might not be portable? */
115 return string_sprintf(%u, (unsigned) timegm(t));
116 }

Hey Jeremy: you're right, it's not.  :)


-- 
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##