com php-src: Fix ssl stream reneg limit test to print only after first renegotiation: ext/openssl/tests/stream_server_reneg_limi t.phpt

From: Date: Sun, 09 Sep 2018 17:53:55 +0000
Subject: com php-src: Fix ssl stream reneg limit test to print only after first renegotiation: ext/openssl/tests/stream_server_reneg_limi t.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-103034@lists.php.net to get a copy of this message
Commit: be50a72715c141befe6f34ece660745da894aaf3 Author: Jakub Zelenka <bukka@php.net> Sun, 9 Sep 2018 18:53:37 +0100 Parents: 90d863898cd4d7a1e073916b4730aca33cc29184 Branches: PHP-7.1 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=be50a72715c141befe6f34ece660745da894aaf3 Log: Fix ssl stream reneg limit test to print only after first renegotiation It has been reported that in some setup the test does multiple renegotiations which is allowed. Changed paths: M ext/openssl/tests/stream_server_reneg_limit.phpt Diff: diff --git a/ext/openssl/tests/stream_server_reneg_limit.phpt b/ext/openssl/tests/stream_server_reneg_limit.phpt index f035335..f033cba 100644 --- a/ext/openssl/tests/stream_server_reneg_limit.phpt +++ b/ext/openssl/tests/stream_server_reneg_limit.phpt @@ -22,14 +22,18 @@ if(substr(PHP_OS, 0, 3) == 'WIN') { */ $serverCode = <<<'CODE' + $printed = false; $serverUri = "ssl://127.0.0.1:64321"; $serverFlags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN; $serverCtx = stream_context_create(['ssl' => [ 'local_cert' => __DIR__ . '/bug54992.pem', 'reneg_limit' => 0, 'reneg_window' => 30, - 'reneg_limit_callback' => function($stream) { - var_dump($stream); + 'reneg_limit_callback' => function($stream) use (&$printed) { + if (!$printed) { + $printed = true; + var_dump($stream); + } } ]]);

« previous php.cvs (#103034) next »