| Index: tests/standalone/io/secure_unauthorized_client.dart
|
| diff --git a/tests/standalone/io/secure_unauthorized_client.dart b/tests/standalone/io/secure_unauthorized_client.dart
|
| index 043577f0a7e73fa1261818801a3f10b3e298723e..8677bec0e96c39920b8946b8fc0f9d4c10152d20 100644
|
| --- a/tests/standalone/io/secure_unauthorized_client.dart
|
| +++ b/tests/standalone/io/secure_unauthorized_client.dart
|
| @@ -8,6 +8,11 @@
|
| import "dart:async";
|
| import "dart:io";
|
|
|
| +String localFile(path) => Platform.script.resolve(path).toFilePath();
|
| +
|
| +SecurityContext clientContext = new SecurityContext()
|
| + ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
|
| +
|
| class ExpectException implements Exception {
|
| ExpectException(this.message);
|
| String toString() => "ExpectException: $message";
|
| @@ -26,7 +31,7 @@ Future runClients(int port) {
|
| var testFutures = [];
|
| for (int i = 0; i < 20; ++i) {
|
| testFutures.add(
|
| - SecureSocket.connect(HOST_NAME, port)
|
| + SecureSocket.connect(HOST_NAME, port, context: clientContext)
|
| .then((SecureSocket socket) {
|
| expect(false);
|
| }, onError: (e) {
|
| @@ -38,7 +43,6 @@ Future runClients(int port) {
|
|
|
|
|
| void main(List<String> args) {
|
| - SecureSocket.initialize();
|
| runClients(int.parse(args[0]))
|
| .then((_) => print('SUCCESS'));
|
| }
|
|
|