| 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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 | 466 |
| 467 if (listenSecure) { | 467 if (listenSecure) { |
| 468 RawSecureServerSocket.bind( | 468 RawSecureServerSocket.bind( |
| 469 HOST_NAME, 0, CERTIFICATE).then(serverReady); | 469 HOST_NAME, 0, CERTIFICATE).then(serverReady); |
| 470 } else { | 470 } else { |
| 471 RawServerSocket.bind(HOST_NAME, 0).then(serverReady); | 471 RawServerSocket.bind(HOST_NAME, 0).then(serverReady); |
| 472 } | 472 } |
| 473 } | 473 } |
| 474 | 474 |
| 475 main() { | 475 main() { |
| 476 var certificateDatabase = Platform.script.resolve('pkcert').toFilePath(); | 476 var certificateDatabase = join(dirname(Platform.script), 'pkcert'); |
| 477 SecureSocket.initialize(database: certificateDatabase, | 477 SecureSocket.initialize(database: certificateDatabase, |
| 478 password: 'dartdart', | 478 password: 'dartdart', |
| 479 useBuiltinRoots: false); | 479 useBuiltinRoots: false); |
| 480 testSimpleBind(); | 480 testSimpleBind(); |
| 481 testInvalidBind(); | 481 testInvalidBind(); |
| 482 testSimpleConnect(CERTIFICATE); | 482 testSimpleConnect(CERTIFICATE); |
| 483 testSimpleConnect("CN=localhost"); | 483 testSimpleConnect("CN=localhost"); |
| 484 testSimpleConnectFail("not_a_nickname", false); | 484 testSimpleConnectFail("not_a_nickname", false); |
| 485 testSimpleConnectFail("CN=notARealDistinguishedName", false); | 485 testSimpleConnectFail("CN=notARealDistinguishedName", false); |
| 486 testSimpleConnectFail("not_a_nickname", true); | 486 testSimpleConnectFail("not_a_nickname", true); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 connectSecure: true, | 520 connectSecure: true, |
| 521 handshakeBeforeSecure: false, | 521 handshakeBeforeSecure: false, |
| 522 postponeSecure: false, | 522 postponeSecure: false, |
| 523 dropReads: true); | 523 dropReads: true); |
| 524 testSimpleReadWrite(listenSecure: false, | 524 testSimpleReadWrite(listenSecure: false, |
| 525 connectSecure: false, | 525 connectSecure: false, |
| 526 handshakeBeforeSecure: true, | 526 handshakeBeforeSecure: true, |
| 527 postponeSecure: true, | 527 postponeSecure: true, |
| 528 dropReads: true); | 528 dropReads: true); |
| 529 } | 529 } |
| OLD | NEW |