Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: tests/standalone/io/secure_unauthorized_client.dart

Issue 1319703002: Breaking Change: merge BoringSSL branch into master (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/secure_socket_test.dart ('k') | tests/standalone/io/secure_unauthorized_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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'));
}
« no previous file with comments | « tests/standalone/io/secure_socket_test.dart ('k') | tests/standalone/io/secure_unauthorized_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698