Skip to content

Commit e16678d

Browse files
1 parent f4d7b87 commit e16678d

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

src/TextUI/Command.php

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -835,21 +835,25 @@ protected function handleSelfUpdate()
835835

836836
print 'Updating the PHPUnit PHAR ... ';
837837

838+
$options = array(
839+
'ssl' => array(
840+
'allow_self_signed' => false,
841+
'cafile' => $caFile,
842+
'verify_peer' => true
843+
)
844+
);
845+
846+
if (PHP_VERSION_ID < 50600) {
847+
$options['ssl']['CN_match'] = 'phar.phpunit.de';
848+
$options['ssl']['SNI_server_name'] = 'phar.phpunit.de';
849+
}
850+
838851
file_put_contents(
839852
$tempFilename,
840853
file_get_contents(
841854
$remoteFilename,
842855
false,
843-
stream_context_create(
844-
array(
845-
'ssl' => array(
846-
'CN_match' => 'phar.phpunit.de',
847-
'allow_self_signed' => false,
848-
'cafile' => $caFile,
849-
'verify_peer' => true
850-
)
851-
)
852-
)
856+
stream_context_create($options)
853857
)
854858
);
855859

0 commit comments

Comments
 (0)