From 1d0d20e974f327e2c6ef3582a844f96c6dcd9f7a Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Mon, 23 Mar 2015 23:10:32 +0100 Subject: [PATCH] Account for SNI changes in HttpSocketTest --- lib/Cake/Test/Case/Network/Http/HttpSocketTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php b/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php index 6456a0c21..de04f18ed 100644 --- a/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php +++ b/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php @@ -317,11 +317,18 @@ class HttpSocketTest extends CakeTestCase { 'verify_peer' => true, 'allow_self_signed' => false, 'verify_depth' => 5, + 'SNI_enabled' => true, 'CN_match' => 'www.cakephp.org', 'cafile' => CAKE . 'Config' . DS . 'cacert.pem' ) ); + if (version_compare(PHP_VERSION, '5.6.0', '>=')) { + $context['ssl']['peer_name'] = 'www.cakephp.org'; + } else { + $context['ssl']['SNI_server_name'] = 'www.cakephp.org'; + } + $tests = array( array( 'request' => 'http://www.cakephp.org/?foo=bar',