Index: tests/standalone/io/secure_server_test.dart |
diff --git a/tests/standalone/io/tls_server_test.dart b/tests/standalone/io/secure_server_test.dart |
similarity index 85% |
rename from tests/standalone/io/tls_server_test.dart |
rename to tests/standalone/io/secure_server_test.dart |
index 32792d77aec1487320f526cd98756fa13998aff0..f2fc2807fc2dce7afcbe721ec21d473d6236f89a 100644 |
--- a/tests/standalone/io/tls_server_test.dart |
+++ b/tests/standalone/io/secure_server_test.dart |
@@ -21,7 +21,7 @@ void WriteAndClose(Socket socket, String message) { |
write(); |
} |
-class TlsTestServer { |
+class SecureTestServer { |
void onConnection(Socket connection) { |
connection.onConnect = () { |
numConnections++; |
@@ -42,7 +42,7 @@ class TlsTestServer { |
} |
int start() { |
- server = new TlsServerSocket(SERVER_ADDRESS, 0, 10, "CN=$HOST_NAME"); |
+ server = new SecureServerSocket(SERVER_ADDRESS, 0, 10, "CN=$HOST_NAME"); |
Expect.isNotNull(server); |
server.onConnection = onConnection; |
server.onError = errorHandlerServer; |
@@ -54,12 +54,12 @@ class TlsTestServer { |
} |
int numConnections = 0; |
- TlsServerSocket server; |
+ SecureServerSocket server; |
} |
-class TlsTestClient { |
- TlsTestClient(int this.port, String this.name) { |
- socket = new TlsSocket(HOST_NAME, port); |
+class SecureTestClient { |
+ SecureTestClient(int this.port, String this.name) { |
+ socket = new SecureSocket(HOST_NAME, port); |
socket.onConnect = this.onConnect; |
socket.onData = () { |
reply = reply.concat(new String.fromCharCodes(socket.read())); |
@@ -87,7 +87,7 @@ class TlsTestClient { |
int port; |
String name; |
- TlsSocket socket; |
+ SecureSocket socket; |
String reply; |
} |
@@ -98,10 +98,10 @@ const CLIENT_NAMES = const ['able', 'baker', 'camera', 'donut', 'echo']; |
void main() { |
Path scriptDir = new Path.fromNative(new Options().script).directoryPath; |
Path certificateDatabase = scriptDir.append('pkcert'); |
- TlsSocket.setCertificateDatabase(certificateDatabase.toNativePath(), |
+ SecureSocket.setCertificateDatabase(certificateDatabase.toNativePath(), |
'dartdart'); |
- var server = new TlsTestServer(); |
+ var server = new SecureTestServer(); |
int port = server.start(); |
EndTest = () { |
@@ -110,6 +110,6 @@ void main() { |
}; |
for (var x in CLIENT_NAMES) { |
- new TlsTestClient(port, x); |
+ new SecureTestClient(port, x); |
} |
} |