svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/openssl/xp_ssl.c trunk/ext/openssl/xp_ssl.c
| From: | Pierre Joye | Date: | Wed, 05 Oct 2011 05:20:51 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/openssl/xp_ssl.c trunk/ext/openssl/xp_ssl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-66694@lists.php.net to get a copy of this message | ||
pajoye Wed, 05 Oct 2011 05:20:51 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=317753
Log:
- Revert r313616 (When we have a blocking SSL socket, respect the timeout
option, scottmac)
# This caused bug #55283 and #55848, we should investigate a proper solution without
# breaking anything.
Bugs: https://bugs.php.net/55283 (Assigned) SSL options set
by mysqli_ssl_set ignored for MySQLi persistent connections
https://bugs.php.net/55848 (Open) mysqlnd + ssl
failure
Changed paths:
U php/php-src/branches/PHP_5_4/NEWS
U php/php-src/branches/PHP_5_4/ext/openssl/xp_ssl.c
U php/php-src/trunk/ext/openssl/xp_ssl.c
Modified: php/php-src/branches/PHP_5_4/NEWS
===================================================================
--- php/php-src/branches/PHP_5_4/NEWS 2011-10-05 04:38:50 UTC (rev 317752)
+++ php/php-src/branches/PHP_5_4/NEWS 2011-10-05 05:20:51 UTC (rev 317753)
@@ -15,6 +15,10 @@
. Fixed bug #55825 (Missing initial value of static locals in trait methods).
(Laruence)
+- Openssl
+- Revert r313616 (When we have a blocking SSL socket, respect the timeout
+ option, scottmac), breaks ssl support as described in bugs #55283 and #55848
+
- Sysvshm
. Fixed bug #55750 (memory copy issue in sysvshm extension).
(Ilia, jeffhuang9999 at gmail dot com)
Modified: php/php-src/branches/PHP_5_4/ext/openssl/xp_ssl.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/openssl/xp_ssl.c 2011-10-05 04:38:50 UTC (rev 317752)
+++ php/php-src/branches/PHP_5_4/ext/openssl/xp_ssl.c 2011-10-05 05:20:51 UTC (rev 317753)
@@ -204,36 +204,6 @@
return didwrite;
}
-static void php_openssl_stream_wait_for_data(php_stream *stream, php_netstream_data_t *sock
TSRMLS_DC)
-{
- int retval;
- struct timeval *ptimeout;
-
- if (sock->socket == -1) {
- return;
- }
-
- sock->timeout_event = 0;
-
- if (sock->timeout.tv_sec == -1)
- ptimeout = NULL;
- else
- ptimeout = &sock->timeout;
-
- while(1) {
- retval = php_pollfd_for(sock->socket, PHP_POLLREADABLE, ptimeout);
-
- if (retval == 0)
- sock->timeout_event = 1;
-
- if (retval >= 0)
- break;
-
- if (php_socket_errno() != EINTR)
- break;
- }
-}
-
static size_t php_openssl_sockop_read(php_stream *stream, char *buf, size_t count TSRMLS_DC)
{
php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract;
@@ -243,13 +213,6 @@
int retry = 1;
do {
- if (sslsock->s.is_blocked) {
- php_openssl_stream_wait_for_data(stream, &(sslsock->s) TSRMLS_CC);
- if (sslsock->s.timeout_event) {
- break;
- }
- /* there is no guarantee that there is application data available but something is there */
- }
nr_bytes = SSL_read(sslsock->ssl_handle, buf, count);
if (nr_bytes <= 0) {
Modified: php/php-src/trunk/ext/openssl/xp_ssl.c
===================================================================
--- php/php-src/trunk/ext/openssl/xp_ssl.c 2011-10-05 04:38:50 UTC (rev 317752)
+++ php/php-src/trunk/ext/openssl/xp_ssl.c 2011-10-05 05:20:51 UTC (rev 317753)
@@ -204,36 +204,6 @@
return didwrite;
}
-static void php_openssl_stream_wait_for_data(php_stream *stream, php_netstream_data_t *sock
TSRMLS_DC)
-{
- int retval;
- struct timeval *ptimeout;
-
- if (sock->socket == -1) {
- return;
- }
-
- sock->timeout_event = 0;
-
- if (sock->timeout.tv_sec == -1)
- ptimeout = NULL;
- else
- ptimeout = &sock->timeout;
-
- while(1) {
- retval = php_pollfd_for(sock->socket, PHP_POLLREADABLE, ptimeout);
-
- if (retval == 0)
- sock->timeout_event = 1;
-
- if (retval >= 0)
- break;
-
- if (php_socket_errno() != EINTR)
- break;
- }
-}
-
static size_t php_openssl_sockop_read(php_stream *stream, char *buf, size_t count TSRMLS_DC)
{
php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract;
@@ -243,13 +213,6 @@
int retry = 1;
do {
- if (sslsock->s.is_blocked) {
- php_openssl_stream_wait_for_data(stream, &(sslsock->s) TSRMLS_CC);
- if (sslsock->s.timeout_event) {
- break;
- }
- /* there is no guarantee that there is application data available but something is there */
- }
nr_bytes = SSL_read(sslsock->ssl_handle, buf, count);
if (nr_bytes <= 0) {