Bug #61285 [Opn]: SSL connections do not timeout

From: Date: Mon, 21 Jan 2013 09:21:45 +0000
Subject: Bug #61285 [Opn]: SSL connections do not timeout
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-176146@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61285&edit=1 ID: 61285 Updated by: rasmus@php.net Reported by: tony2001@php.net Summary: SSL connections do not timeout Status: Open Type: Bug Package: OpenSSL related PHP Version: 5.4SVN-2012-03-05 (SVN) Block user comment: N Private report: N New Comment: Tony, you can just add ?w=1 to the Github URL and it will show you the diff without the whitespace changes. Previous Comments: ------------------------------------------------------------------------ [2013-01-21 09:20:27] pajoye@php.net Could you create a pull request as well? Much easier to track and comment :) ------------------------------------------------------------------------ [2013-01-21 09:16:11] tony2001@php.net Uhm.. for some reason Github shows a lot of whitespace changes there. Could you try to rewrite the patch to avoid them? ------------------------------------------------------------------------ [2013-01-20 18:38:01] bbroerman at bbroerman dot net I have a proposed fix on my Github repo: https://github.com/bbroerman30/php-src I have tested timeouts of various amounts with blocking sockets, but haven't tried to check other side-effects as of yet. How it works is within the read/write methods themselves, if the socket is blocking and has a timeout set, it will change the socket (temporarily) to non-blocking, and check the response from the attempted read/write with SSL_get_error and then wait/retry based on the response from SSL_get_error and using php_pollfd_for. When I get a chance (probably next week or so) I'll try to test the below bug, and test with non-blocking streams. Please feel free to test as you need, and let me know if you find any bugs. ------------------------------------------------------------------------ [2012-03-05 12:37:02] pajoye@php.net I am not sure anymore that this patch is correct as it looks as it will reintroduce the issue introduced by a previous attempt to fix that, which was reverted here: http://svn.php.net/viewvc?view=revision&revision=315310 ------------------------------------------------------------------------ [2012-03-05 12:08:40] tony2001@php.net The following patch has been added/updated: Patch Name: ssl_timeout.diff Revision: 1330949320 URL: https://bugs.php.net/patch-display.php?bug=61285&patch=ssl_timeout.diff&revision=1330949320 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=61285 -- Edit this bug report at https://bugs.php.net/bug.php?id=61285&edit=1

« previous php.bugs (#176146) next »