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 a600d7458f3ab0b1f444217dbc365a4fb1b77972..4815f2749f6ed64a402aefe6870e6a7c84420318 100644 |
--- a/tests/standalone/io/secure_unauthorized_test.dart |
+++ b/tests/standalone/io/secure_unauthorized_test.dart |
@@ -12,11 +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() |
..useCertificateChain(localFile('certificates/untrusted_server_chain.pem')) |
- ..usePrivateKey(localFile('certificates/untrusted_server_key.pem'), |
- password: 'dartdart'); |
+ ..usePrivateKeyAsBytes(readLocalFile('certificates/untrusted_server_key.pem'), |
+ password: 'dartdart'); |
Future<SecureServerSocket> runServer() { |
return SecureServerSocket.bind(HOST_NAME, 0, serverContext) |