Index: tests/standalone/io/secure_socket_test.dart |
diff --git a/tests/standalone/io/secure_socket_test.dart b/tests/standalone/io/secure_socket_test.dart |
index 897bd84bea1234bc50a09e947e83c596f1b3127c..509c092aa76938104706daf7c84260c57942d759 100644 |
--- a/tests/standalone/io/secure_socket_test.dart |
+++ b/tests/standalone/io/secure_socket_test.dart |
@@ -13,11 +13,12 @@ import "dart:async"; |
import "dart:io"; |
String localFile(path) => Platform.script.resolve(path).toFilePath(); |
+List<int> readLocalFile(path) => (new File(localFile(path))).readAsBytesSync(); |
SecurityContext serverContext = new SecurityContext() |
..useCertificateChain(localFile('certificates/server_chain.pem')) |
- ..usePrivateKey(localFile('certificates/server_key.pem'), |
- password: 'dartdart'); |
+ ..usePrivateKeyAsBytes(readLocalFile('certificates/server_key.pem'), |
+ password: 'dartdart'); |
SecurityContext clientContext = new SecurityContext() |
..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem')); |