Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Account for SNI changes in HttpSocketTest
  • Loading branch information
RichieB2B authored and markstory committed Mar 24, 2015
1 parent 1f7b787 commit 1d0d20e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
Expand Up @@ -317,11 +317,18 @@ public function testRequest() {
'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',
Expand Down

0 comments on commit 1d0d20e

Please sign in to comment.