OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // | 4 // |
5 // VMOptions= | 5 // VMOptions= |
6 // VMOptions=--short_socket_read | 6 // VMOptions=--short_socket_read |
7 // VMOptions=--short_socket_write | 7 // VMOptions=--short_socket_write |
8 // VMOptions=--short_socket_read --short_socket_write | 8 // VMOptions=--short_socket_read --short_socket_write |
9 | 9 |
10 import "dart:async"; | 10 import "dart:async"; |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 verifyTestData(dataReceived); | 183 verifyTestData(dataReceived); |
184 socket.close(); | 184 socket.close(); |
185 asyncEnd(); | 185 asyncEnd(); |
186 }); | 186 }); |
187 }); | 187 }); |
188 }); | 188 }); |
189 } | 189 } |
190 | 190 |
191 main() { | 191 main() { |
192 asyncStart(); | 192 asyncStart(); |
193 String certificateDatabase = Platform.script.resolve('pkcert').toFilePath(); | 193 String certificateDatabase = join(dirname(Platform.script), 'pkcert'); |
194 SecureSocket.initialize(database: certificateDatabase, | 194 SecureSocket.initialize(database: certificateDatabase, |
195 password: 'dartdart', | 195 password: 'dartdart', |
196 useBuiltinRoots: false); | 196 useBuiltinRoots: false); |
197 testSimpleBind(); | 197 testSimpleBind(); |
198 testInvalidBind(); | 198 testInvalidBind(); |
199 testSimpleConnect(CERTIFICATE); | 199 testSimpleConnect(CERTIFICATE); |
200 testSimpleConnect("CN=localhost"); | 200 testSimpleConnect("CN=localhost"); |
201 testSimpleConnectFail("not_a_nickname", false); | 201 testSimpleConnectFail("not_a_nickname", false); |
202 testSimpleConnectFail("CN=notARealDistinguishedName", false); | 202 testSimpleConnectFail("CN=notARealDistinguishedName", false); |
203 testSimpleConnectFail("not_a_nickname", true); | 203 testSimpleConnectFail("not_a_nickname", true); |
204 testSimpleConnectFail("CN=notARealDistinguishedName", true); | 204 testSimpleConnectFail("CN=notARealDistinguishedName", true); |
205 testServerListenAfterConnect(); | 205 testServerListenAfterConnect(); |
206 testSimpleReadWrite(); | 206 testSimpleReadWrite(); |
207 asyncEnd(); | 207 asyncEnd(); |
208 } | 208 } |
OLD | NEW |