Re: overflow when calling X509_gmtime_adj() on 32-bit systems

2013-02-03 Thread Alexander Hollerith
On 03.02.2013, at 12:28, "Dr. Stephen Henson" wrote: > On Sun, Feb 03, 2013, Dongsheng Song wrote: > >> On Sun, Feb 3, 2013 at 7:01 PM, Dr. Stephen Henson wrote: >>> In that above code example if you do: >>> >>> X509_gmtime_adj_ex(X509_get_notAfter(x), days, 0, NULL); >>> >>> that should res

overflow when calling X509_gmtime_adj() on 32-bit systems

2013-02-02 Thread Alexander Hollerith
Hi, The php openssl library implements a function named openssl_csr_sign() and inside that function one can find the following line: X509_gmtime_adj(X509_get_notAfter(new_cert), (long)60*60*24*num_days); This obviously provokes an overflow in cases of large values of "num_days", say 365