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

Unified Diff: tests/standalone/io/secure_socket_renegotiate_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
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]));
}
« no previous file with comments | « tests/standalone/io/secure_socket_bad_data_test.dart ('k') | tests/standalone/io/secure_socket_renegotiate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698