Skip to content

Commit 2010f74

Browse files
committed
Remove/revise tests relying on peer_name SSL context option
This option is not supported by libmongoc's SSL implementation. The test for PHPC-720 can be modified to allow invalid host names.
1 parent f8ee3ad commit 2010f74

File tree

3 files changed

+3
-124
lines changed

3 files changed

+3
-124
lines changed

tests/connect/bug0720.phpt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ require_once __DIR__ . "/../utils/basic.inc";
99
$SSL_DIR = realpath(__DIR__ . '/../../scripts/ssl/');
1010

1111
$driverOptions = [
12-
'peer_name' => 'server',
13-
'verify_peer' => true,
14-
'verify_peer_name' => true,
15-
'allow_self_signed' => false,
16-
'cafile' => $SSL_DIR . '/ca.pem', /* Defaults to openssl.cafile */
12+
// libmongoc does not allow the hostname to be overridden as "server"
13+
'allow_invalid_hostname' => true,
14+
'ca_file' => $SSL_DIR . '/ca.pem',
1715
];
1816

1917
$manager = new MongoDB\Driver\Manager(STANDALONE_SSL, ['ssl' => true], $driverOptions);

tests/connect/standalone-ssl-0004.phpt

Lines changed: 0 additions & 50 deletions
This file was deleted.

tests/connect/standalone-ssl-0005.phpt

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)