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

Unified Diff: tests/standalone/io/secure_unauthorized_test.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_unauthorized_test.dart
diff --git a/tests/standalone/io/secure_unauthorized_test.dart b/tests/standalone/io/secure_unauthorized_test.dart
index 453b8b1bd4bc57c5dca288096c2355fddd116cee..a600d7458f3ab0b1f444217dbc365a4fb1b77972 100644
--- a/tests/standalone/io/secure_unauthorized_test.dart
+++ b/tests/standalone/io/secure_unauthorized_test.dart
@@ -11,14 +11,15 @@ import "dart:async";
import "dart:io";
const HOST_NAME = "localhost";
-const CERTIFICATE = "localhost_cert";
+String localFile(path) => Platform.script.resolve(path).toFilePath();
-Future<SecureServerSocket> runServer() {
- SecureSocket.initialize(
- database: Platform.script.resolve('pkcert').toFilePath(),
- password: 'dartdart');
+SecurityContext serverContext = new SecurityContext()
+ ..useCertificateChain(localFile('certificates/untrusted_server_chain.pem'))
+ ..usePrivateKey(localFile('certificates/untrusted_server_key.pem'),
+ password: 'dartdart');
- return SecureServerSocket.bind(HOST_NAME, 0, CERTIFICATE)
+Future<SecureServerSocket> runServer() {
+ return SecureServerSocket.bind(HOST_NAME, 0, serverContext)
.then((SecureServerSocket server) {
server.listen((SecureSocket socket) {
socket.listen((_) { },
« no previous file with comments | « tests/standalone/io/secure_unauthorized_client.dart ('k') | tests/standalone/io/socket_upgrade_to_secure_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698