Skip to content

Commit 57cb6ac

Browse files
committed
Merge pull request #124
2 parents 4144ca7 + f8adae7 commit 57cb6ac

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

tests/connect/standalone-x509-0001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Connect to MongoDB with using SSL and X.509 auth
2+
Connect to MongoDB with using SSL and X.509 auth (stream context)
33
--SKIPIF--
44
<?php require __DIR__ . "/../utils/basic-skipif.inc"; NEEDS("STANDALONE_X509"); ?>
55
--FILE--

tests/connect/standalone-x509-0002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Connect to MongoDB with using X509 retrieving username from certificate #002
2+
Connect to MongoDB with using X509 retrieving username from certificate (stream context)
33
--SKIPIF--
44
<?php require __DIR__ . "/../utils/basic-skipif.inc"; NEEDS("STANDALONE_X509"); ?>
55
--FILE--

tests/connect/standalone-x509-0003.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Connect to MongoDB with using SSL and X.509 auth
2+
Connect to MongoDB with using SSL and X.509 auth (SSL options)
33
--SKIPIF--
44
<?php require __DIR__ . "/../utils/basic-skipif.inc"; NEEDS("STANDALONE_X509"); ?>
55
--FILE--

tests/connect/standalone-x509-0004.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Connect to MongoDB with using X509 retrieving username from certificate #002
2+
Connect to MongoDB with using X509 retrieving username from certificate (SSL options)
33
--SKIPIF--
44
<?php require __DIR__ . "/../utils/basic-skipif.inc"; NEEDS("STANDALONE_X509"); ?>
55
--FILE--

tests/connect/standalone-x509-error-0001.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Connect to MongoDB with using X509 retrieving username from certificate #002
2+
X509 connection should not reuse previous stream after an auth failure
33
--SKIPIF--
44
<?php require __DIR__ . "/../utils/basic-skipif.inc"; NEEDS("STANDALONE_X509"); ?>
55
--FILE--
@@ -18,23 +18,23 @@ function connect($dsn, $opts) {
1818
echo get_class($e), ": ", $e->getMessage(), "\n";
1919
}
2020
return $manager;
21-
2221
}
23-
$SSL_DIR = realpath(__DIR__ . "/" . "./../../scripts/ssl/");
2422

23+
$SSL_DIR = realpath(__DIR__ . "/" . "./../../scripts/ssl/");
2524
$opts = array(
2625
"peer_name" => "server",
2726
"verify_peer" => true,
2827
"verify_peer_name" => true,
2928
"allow_self_signed" => false,
3029
"cafile" => $SSL_DIR . "/ca.pem", /* Defaults to openssl.cafile */
3130
"capath" => $SSL_DIR, /* Defaults to openssl.capath */
32-
"local_cert" => $SSL_DIR . "/src/libmongoc/tests/certificates/client.pem",
31+
"local_cert" => $SSL_DIR . "/client.pem",
3332
);
33+
34+
/* Wrong username */
3435
$parsed = parse_url(STANDALONE_X509);
3536
$dsn = sprintf("mongodb://username@%s:%d/%s?ssl=true&authMechanism=MONGODB-X509", $parsed["host"], $parsed["port"], DATABASE_NAME);
3637

37-
3838
$m1 = connect($dsn, $opts);
3939
$m2 = connect($dsn, $opts);
4040

0 commit comments

Comments
 (0)