Account for SNI changes in HttpSocketTest

This commit is contained in:
Richard van den Berg 2015-03-23 23:10:32 +01:00 committed by mark_story
parent 1f7b787236
commit 1d0d20e974

View file

@ -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',