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

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

Issue 1665433002: Adds SecurityContext.setTrustedCertificatesBytes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 995130fcf4aae80142626735ae9ad857983dcb17..097a0d01d6da7eb79a8746f8c1c848626cb26115 100644
--- a/tests/standalone/io/secure_unauthorized_test.dart
+++ b/tests/standalone/io/secure_unauthorized_test.dart
@@ -12,13 +12,12 @@ import "dart:io";
const HOST_NAME = "localhost";
String localFile(path) => Platform.script.resolve(path).toFilePath();
-List<int> readLocalFile(path) => (new File(localFile(path))).readAsBytesSync();
SecurityContext serverContext = new SecurityContext()
- ..useCertificateChainBytes(readLocalFile(
+ ..useCertificateChainSync(localFile(
'certificates/untrusted_server_chain.pem'))
- ..usePrivateKeyBytes(readLocalFile('certificates/untrusted_server_key.pem'),
- password: 'dartdart');
+ ..usePrivateKeySync(localFile('certificates/untrusted_server_key.pem'),
+ password: 'dartdart');
Future<SecureServerSocket> runServer() {
return SecureServerSocket.bind(HOST_NAME, 0, serverContext)
« no previous file with comments | « tests/standalone/io/secure_unauthorized_client.dart ('k') | tests/standalone/io/security_context_argument_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698