mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Account for SNI changes in HttpSocketTest
This commit is contained in:
parent
1f7b787236
commit
1d0d20e974
1 changed files with 7 additions and 0 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Reference in a new issue