| Index: tests/standalone/io/secure_socket_renegotiate_client.dart
|
| diff --git a/tests/standalone/io/secure_socket_renegotiate_client.dart b/tests/standalone/io/secure_socket_renegotiate_client.dart
|
| index cc3905a3ffec4efb9ae4e01a3e7a4c59f92a76af..8c414582b7060644ac7e7e69a1ed039087c774e8 100644
|
| --- a/tests/standalone/io/secure_socket_renegotiate_client.dart
|
| +++ b/tests/standalone/io/secure_socket_renegotiate_client.dart
|
| @@ -12,8 +12,10 @@ import "dart:convert";
|
| import "dart:io";
|
|
|
| const HOST_NAME = "localhost";
|
| -const CERTIFICATE = "localhost_cert";
|
| +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);
|
| @@ -37,7 +39,10 @@ void expect(condition) {
|
|
|
|
|
| void runClient(int port) {
|
| - SecureSocket.connect(HOST_NAME, port, sendClientCertificate: true)
|
| + SecureSocket.connect(HOST_NAME,
|
| + port,
|
| + context: clientContext,
|
| + sendClientCertificate: true)
|
| .then((SecureSocket socket) {
|
| X509Certificate certificate = socket.peerCertificate;
|
| expect(certificate != null);
|
| @@ -74,6 +79,5 @@ void runClient(int port) {
|
|
|
|
|
| void main(List<String> args) {
|
| - SecureSocket.initialize(database: args[1], password: 'dartdart');
|
| runClient(int.parse(args[0]));
|
| }
|
|
|