ID: 45382 Updated by: [EMAIL PROTECTED] Reported By: vnegrier at optilian dot com -Status: Open +Status: Closed Bug Type: OpenSSL related Operating System: linux 2.6 PHP Version: 5.2.6 New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2008-06-27 19:11:02] vnegrier at optilian dot com Description: ------------ there's a bug in the stream_socket_enable_crypto() timeout test: the "timeout" var is only decremented when tve.sec and tvs.sec differ because (at least with gcc-4.3.1) "tv_usec / 1000000" is cast as int, leading to timeout inaccuracy, fix below : --- xp_ssl.c.orig 2008-06-27 21:02:58.000000000 +0200 +++ xp_ssl.c 2008-06-27 21:03:07.000000000 +0200 @@ -418,7 +418,7 @@ n = SSL_connect(sslsock->ssl_handle); gettimeofday(&tve, &tz); - timeout -= (tve.tv_sec + tve.tv_usec / 1000000) - (tvs.tv_sec + tvs.tv_usec / 1000000); + timeout -= (tve.tv_sec + (float)tve.tv_usec / 1000000) - (tvs.tv_sec + (float)tvs.tv_usec / 1000000); if (timeout < 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSL: connection timeout"); return -1; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45382&edit=1