-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #1094: changes from master moved to pre-nnbd branch for LibTest…
…s/io/RawSecureServerSocket folder.
- Loading branch information
Showing
11 changed files
with
170 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,19 +16,22 @@ | |
/// @description Checks that the [first] returns the first element of this. | ||
/// @author [email protected] | ||
// OtherResources=server_chain.pem | ||
// OtherResources=server_key.pem | ||
// OtherResources=trusted_certs.pem | ||
import "dart:io"; | ||
import "dart:async"; | ||
import "../../../Utils/expect.dart"; | ||
|
||
String localFile(path) => Platform.script.resolve(path).toFilePath(); | ||
|
||
SecurityContext serverContext = new SecurityContext() | ||
..useCertificateChain(localFile('../certificates/server_chain.pem')) | ||
..usePrivateKey(localFile('../certificates/server_key.pem'), | ||
..useCertificateChain(localFile('server_chain.pem')) | ||
..usePrivateKey(localFile('server_key.pem'), | ||
password: 'co19test'); | ||
|
||
SecurityContext clientContext = new SecurityContext() | ||
..setTrustedCertificates(localFile('../certificates/trusted_certs.pem')); | ||
..setTrustedCertificates(localFile('trusted_certs.pem')); | ||
|
||
check(InternetAddress address) { | ||
const messageSize = 10; | ||
|
@@ -47,7 +50,7 @@ check(InternetAddress address) { | |
bs.listen((client) { | ||
int bytesRead = 0; | ||
int bytesWritten = 0; | ||
List<int> data = new List<int>(messageSize); | ||
List<int> data = new List<int>.filled(messageSize, 0); | ||
client.writeEventsEnabled = false; | ||
sList[sli++] = client; | ||
client.listen((event) { | ||
|
@@ -99,7 +102,7 @@ check(InternetAddress address) { | |
int bytesRead = 0; | ||
int bytesWritten = 0; | ||
List<int> dataSent = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | ||
List<int> dataReceived = new List<int>(dataSent.length); | ||
List<int> dataReceived = new List<int>.filled(dataSent.length, 0); | ||
client.listen((event) { | ||
switch (event) { | ||
case RawSocketEvent.read: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,19 +17,22 @@ | |
/// is not equal to the last element of this. | ||
/// @author [email protected] | ||
// OtherResources=server_chain.pem | ||
// OtherResources=server_key.pem | ||
// OtherResources=trusted_certs.pem | ||
import "dart:io"; | ||
import "dart:async"; | ||
import "../../../Utils/expect.dart"; | ||
|
||
String localFile(path) => Platform.script.resolve(path).toFilePath(); | ||
|
||
SecurityContext serverContext = new SecurityContext() | ||
..useCertificateChain(localFile('../certificates/server_chain.pem')) | ||
..usePrivateKey(localFile('../certificates/server_key.pem'), | ||
..useCertificateChain(localFile('server_chain.pem')) | ||
..usePrivateKey(localFile('server_key.pem'), | ||
password: 'co19test'); | ||
|
||
SecurityContext clientContext = new SecurityContext() | ||
..setTrustedCertificates(localFile('../certificates/trusted_certs.pem')); | ||
..setTrustedCertificates(localFile('trusted_certs.pem')); | ||
|
||
check(InternetAddress address) { | ||
const messageSize = 10; | ||
|
@@ -61,7 +64,7 @@ check(InternetAddress address) { | |
bs.listen((client) { | ||
int bytesRead = 0; | ||
int bytesWritten = 0; | ||
List<int> data = new List<int>(messageSize); | ||
List<int> data = new List<int>.filled(messageSize, 0); | ||
client.writeEventsEnabled = false; | ||
client.listen((event) { | ||
switch (event) { | ||
|
@@ -109,7 +112,7 @@ check(InternetAddress address) { | |
int bytesRead = 0; | ||
int bytesWritten = 0; | ||
List<int> dataSent = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | ||
List<int> dataReceived = new List<int>(dataSent.length); | ||
List<int> dataReceived = new List<int>.filled(dataSent.length, 0); | ||
client.listen((event) { | ||
switch (event) { | ||
case RawSocketEvent.read: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,19 +13,22 @@ | |
/// @description Checks that the [first] is equivalent to this.elementAt(0). | ||
/// @author [email protected] | ||
// OtherResources=server_chain.pem | ||
// OtherResources=server_key.pem | ||
// OtherResources=trusted_certs.pem | ||
import "dart:io"; | ||
import "dart:async"; | ||
import "../../../Utils/expect.dart"; | ||
|
||
String localFile(path) => Platform.script.resolve(path).toFilePath(); | ||
|
||
SecurityContext serverContext = new SecurityContext() | ||
..useCertificateChain(localFile('../certificates/server_chain.pem')) | ||
..usePrivateKey(localFile('../certificates/server_key.pem'), | ||
..useCertificateChain(localFile('server_chain.pem')) | ||
..usePrivateKey(localFile('server_key.pem'), | ||
password: 'co19test'); | ||
|
||
SecurityContext clientContext = new SecurityContext() | ||
..setTrustedCertificates(localFile('../certificates/trusted_certs.pem')); | ||
..setTrustedCertificates(localFile('trusted_certs.pem')); | ||
|
||
check(InternetAddress address) { | ||
const messageSize = 10; | ||
|
@@ -57,7 +60,7 @@ check(InternetAddress address) { | |
bs.listen((client) { | ||
int bytesRead = 0; | ||
int bytesWritten = 0; | ||
List<int> data = new List<int>(messageSize); | ||
List<int> data = new List<int>.filled(messageSize, 0); | ||
client.writeEventsEnabled = false; | ||
client.listen((event) { | ||
switch (event) { | ||
|
@@ -105,7 +108,7 @@ check(InternetAddress address) { | |
int bytesRead = 0; | ||
int bytesWritten = 0; | ||
List<int> dataSent = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | ||
List<int> dataReceived = new List<int>(dataSent.length); | ||
List<int> dataReceived = new List<int>.filled(dataSent.length, 0); | ||
client.listen((event) { | ||
switch (event) { | ||
case RawSocketEvent.read: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,19 +21,22 @@ | |
/// false. | ||
/// @author [email protected] | ||
// OtherResources=server_chain.pem | ||
// OtherResources=server_key.pem | ||
// OtherResources=trusted_certs.pem | ||
import "dart:io"; | ||
import "dart:async"; | ||
import "../../../Utils/expect.dart"; | ||
|
||
String localFile(path) => Platform.script.resolve(path).toFilePath(); | ||
|
||
SecurityContext serverContext = new SecurityContext() | ||
..useCertificateChain(localFile('../certificates/server_chain.pem')) | ||
..usePrivateKey(localFile('../certificates/server_key.pem'), | ||
..useCertificateChain(localFile('server_chain.pem')) | ||
..usePrivateKey(localFile('server_key.pem'), | ||
password: 'co19test'); | ||
|
||
SecurityContext clientContext = new SecurityContext() | ||
..setTrustedCertificates(localFile('../certificates/trusted_certs.pem')); | ||
..setTrustedCertificates(localFile('trusted_certs.pem')); | ||
|
||
check(InternetAddress address, int clNumber) { | ||
const messageSize = 10; | ||
|
@@ -52,7 +55,7 @@ check(InternetAddress address, int clNumber) { | |
bs.listen((client) { | ||
int bytesRead = 0; | ||
int bytesWritten = 0; | ||
List<int> data = new List<int>(messageSize); | ||
List<int> data = new List<int>.filled(messageSize, 0); | ||
client.writeEventsEnabled = false; | ||
client.listen((event) { | ||
switch (event) { | ||
|
@@ -100,7 +103,7 @@ check(InternetAddress address, int clNumber) { | |
int bytesRead = 0; | ||
int bytesWritten = 0; | ||
List<int> dataSent = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | ||
List<int> dataReceived = new List<int>(dataSent.length); | ||
List<int> dataReceived = new List<int>.filled(dataSent.length, 0); | ||
client.listen((event) { | ||
switch (event) { | ||
case RawSocketEvent.read: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,19 +10,22 @@ | |
/// @description Checks that [last] returns the last element of this. | ||
/// @author [email protected] | ||
// OtherResources=server_chain.pem | ||
// OtherResources=server_key.pem | ||
// OtherResources=trusted_certs.pem | ||
import "dart:io"; | ||
import "dart:async"; | ||
import "../../../Utils/expect.dart"; | ||
|
||
String localFile(path) => Platform.script.resolve(path).toFilePath(); | ||
|
||
SecurityContext serverContext = new SecurityContext() | ||
..useCertificateChain(localFile('../certificates/server_chain.pem')) | ||
..usePrivateKey(localFile('../certificates/server_key.pem'), | ||
..useCertificateChain(localFile('server_chain.pem')) | ||
..usePrivateKey(localFile('server_key.pem'), | ||
password: 'co19test'); | ||
|
||
SecurityContext clientContext = new SecurityContext() | ||
..setTrustedCertificates(localFile('../certificates/trusted_certs.pem')); | ||
..setTrustedCertificates(localFile('trusted_certs.pem')); | ||
|
||
check(InternetAddress address) { | ||
const messageSize = 10; | ||
|
@@ -42,7 +45,7 @@ check(InternetAddress address) { | |
bs.listen((client) { | ||
int bytesRead = 0; | ||
int bytesWritten = 0; | ||
List<int> data = new List<int>(messageSize); | ||
List<int> data = new List<int>.filled(messageSize, 0); | ||
client.writeEventsEnabled = false; | ||
sList[sli++] = client; | ||
client.listen((event) { | ||
|
@@ -91,7 +94,7 @@ check(InternetAddress address) { | |
int bytesRead = 0; | ||
int bytesWritten = 0; | ||
List<int> dataSent = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | ||
List<int> dataReceived = new List<int>(dataSent.length); | ||
List<int> dataReceived = new List<int>.filled(dataSent.length, 0); | ||
client.listen((event) { | ||
switch (event) { | ||
case RawSocketEvent.read: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,19 +14,22 @@ | |
/// ends, the returned future is completed with the number of elements. | ||
/// @author [email protected] | ||
// OtherResources=server_chain.pem | ||
// OtherResources=server_key.pem | ||
// OtherResources=trusted_certs.pem | ||
import "dart:io"; | ||
import "dart:async"; | ||
import "../../../Utils/expect.dart"; | ||
|
||
String localFile(path) => Platform.script.resolve(path).toFilePath(); | ||
|
||
SecurityContext serverContext = new SecurityContext() | ||
..useCertificateChain(localFile('../certificates/server_chain.pem')) | ||
..usePrivateKey(localFile('../certificates/server_key.pem'), | ||
..useCertificateChain(localFile('server_chain.pem')) | ||
..usePrivateKey(localFile('server_key.pem'), | ||
password: 'co19test'); | ||
|
||
SecurityContext clientContext = new SecurityContext() | ||
..setTrustedCertificates(localFile('../certificates/trusted_certs.pem')); | ||
..setTrustedCertificates(localFile('trusted_certs.pem')); | ||
|
||
check(InternetAddress address, int clNumber) { | ||
const messageSize = 10; | ||
|
@@ -44,7 +47,7 @@ check(InternetAddress address, int clNumber) { | |
bs.listen((client) { | ||
int bytesRead = 0; | ||
int bytesWritten = 0; | ||
List<int> data = new List<int>(messageSize); | ||
List<int> data = new List<int>.filled(messageSize, 0); | ||
client.writeEventsEnabled = false; | ||
client.listen((event) { | ||
switch (event) { | ||
|
@@ -92,7 +95,7 @@ check(InternetAddress address, int clNumber) { | |
int bytesRead = 0; | ||
int bytesWritten = 0; | ||
List<int> dataSent = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | ||
List<int> dataReceived = new List<int>(dataSent.length); | ||
List<int> dataReceived = new List<int>.filled(dataSent.length, 0); | ||
client.listen((event) { | ||
switch (event) { | ||
case RawSocketEvent.read: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDZDCCAkygAwIBAgIBATANBgkqhkiG9w0BAQsFADAgMR4wHAYDVQQDDBVpbnRl | ||
cm1lZGlhdGVhdXRob3JpdHkwHhcNMTgwNDA2MDk1NTE0WhcNMjgwNDAzMDk1NTE0 | ||
WjAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw | ||
ggEKAoIBAQCwC/86a+3txjHaU9KfKGuo28l5lXwcfBcj+/0IicT8WGpgEobYm5NQ | ||
JSsGviUw48T2IYuadRmQKx8C4MM3PyDSCxvLjBlwYxk2AQOKjRcv1g/QliqkPuIF | ||
7cut9+0roe8KsCkW22/6e9wpRIfYvZdgcLpc3j+q9sLfqHI/F+AWSOP7is048qmj | ||
gUooHJm6fPsiLgmyA3A4mqfwooqrOErvvZ+aU9fOGYWaRm1daseKxxWDP+l2P1cd | ||
pJ5Y7MmbwGOmxIAYjPyfB/eMNupV7IP2N39tW90OmnhQS2fgXIpzR/zJ4MoTOORw | ||
uAAv8h2FTPLKfve2mrMsn6V9Z09Dd97vAgMBAAGjgbQwgbEwPAYDVR0RBDUwM4IJ | ||
bG9jYWxob3N0ggkxMjcuMC4wLjGCAzo6MYcEfwAAAYcQAAAAAAAAAAAAAAAAAAAA | ||
ATAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBSakME4E9YcflmW2oV1lIZHqu3TeTAf | ||
BgNVHSMEGDAWgBR4PqkXDr4yCikpC0hgSewA2dFZkzAOBgNVHQ8BAf8EBAMCA6gw | ||
EwYDVR0lBAwwCgYIKwYBBQUHAwEwDQYJKoZIhvcNAQELBQADggEBAJyeglWkrwN+ | ||
ZlzQUyQVLLN7hBnbXf+ffrs89opDUQP/zABn9vE6PfkiouqjT47+xZCitytQCZdp | ||
nGvi+xwz3NPVK0HHkZGEk2z083uAkM7rQe+7KWOrJajaBjcJ85IU2NZWK46O6maB | ||
qiQ3WsWjC5Z+4Ad4AHbItQ4vxTXIFCe3Gn2b/kt2ONzDrf0+Ram51vg5xpzwYXmV | ||
2kphsPkgzwvOhHF5g43O/nqhoKVfQWqfdd6BfPf6lRvC85u8BUc4lzIHc4eukrJj | ||
jmEnwg72J8HLl+52LyqHHLVZTklgjCgn0edL1GBdaT5/kD/fcCwsrmVqyngep4xH | ||
iR7fHYzqVdo= | ||
-----END CERTIFICATE----- | ||
-----BEGIN CERTIFICATE----- | ||
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trDdELJbt7IGjl//dK74PkOJqn6B | ||
JYFbl64piBJSexaA/0vOf3teGyGKgCHcGgafbmw+FGzAAJss46bU2IiQuEqzLciF | ||
LPFpRo8s9np0Fc/QaPJ8sn6AoO7i0IVokfw4OL9wPt3jIEQ+AONnnBq7H0+tjd4= | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
-----BEGIN ENCRYPTED PRIVATE KEY----- | ||
MIIE4DAcBgoqhkiG9w0BDAEBMA4ECMT+uxuXVyIPAgIIAASCBL6s5pAMz7frTs8G | ||
OasqkaDJhNlH2LXQNpEAJjGsOdhc+zy5/ZfZ4wCzgEa9WbT6bQOWRaMqw9CFSu9i | ||
OXCTzmUmn3w/X/5NpVGNbnuKDyt2vykoNqMo0O37ZJk3Kkj7oPpQgwPPGQU/tQsr | ||
tfgP29oHt8zXV7sb1j5vDcHFYmRy2jKf3dCeIa/mLFRCoBZfrSW31mhb1epuovuz | ||
rCjRAkcMrpFQdBj/An2fk/dS21c2eWbG4JfduckZx+HNI/i7Q4Oq1wu2H9FRjOq6 | ||
FXcz+fylchs47DKoNAGkaARTlzYr1Sa1xrkKPySkDVcXK7sve/BWM8bN9YSiaYX/ | ||
aaOQBFTUTYroFoZsVMtTpD7AA63U7UEiQTJTiyd26S2LROlKjCTsorbx5shBZUfv | ||
s1fX4/LXQ9jeRnaZoZZheFFV/6qJ4iasU6CunHM0D+t6wbYe5TddnT0VPDNdTshh | ||
VuTx6maehkYFIdk8IhHHINHjbCqw0V7eXORlAGsSVTF3I4VzoKAKknw82UCtjGaN | ||
uGUCjo6wTQeLnrzgmUSlYb5c3/0NGreDC77EVLsdt/jcpNXP0P270J3zRI1dvmff | ||
Mq9I4rH7ea1wJb8Ol+g9DGypt+HSLfM2beStQRcUf+KE7ZQc/MoJ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- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,19 +14,22 @@ | |
/// future completes with an error. | ||
/// @author [email protected] | ||
// OtherResources=server_chain.pem | ||
// OtherResources=server_key.pem | ||
// OtherResources=trusted_certs.pem | ||
import "dart:io"; | ||
import "dart:async"; | ||
import "../../../Utils/expect.dart"; | ||
|
||
String localFile(path) => Platform.script.resolve(path).toFilePath(); | ||
|
||
SecurityContext serverContext = new SecurityContext() | ||
..useCertificateChain(localFile('../certificates/server_chain.pem')) | ||
..usePrivateKey(localFile('../certificates/server_key.pem'), | ||
..useCertificateChain(localFile('server_chain.pem')) | ||
..usePrivateKey(localFile('server_key.pem'), | ||
password: 'co19test'); | ||
|
||
SecurityContext clientContext = new SecurityContext() | ||
..setTrustedCertificates(localFile('../certificates/trusted_certs.pem')); | ||
..setTrustedCertificates(localFile('trusted_certs.pem')); | ||
|
||
check(InternetAddress address) { | ||
const messageSize = 10; | ||
|
@@ -47,7 +50,7 @@ check(InternetAddress address) { | |
bs.listen((client) { | ||
int bytesRead = 0; | ||
int bytesWritten = 0; | ||
List<int> data = new List<int>(messageSize); | ||
List<int> data = new List<int>.filled(messageSize, 0); | ||
client.writeEventsEnabled = false; | ||
sList[sli++] = client; | ||
client.listen((event) { | ||
|
@@ -96,7 +99,7 @@ check(InternetAddress address) { | |
int bytesRead = 0; | ||
int bytesWritten = 0; | ||
List<int> dataSent = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | ||
List<int> dataReceived = new List<int>(dataSent.length); | ||
List<int> dataReceived = new List<int>.filled(dataSent.length, 0); | ||
client.listen((event) { | ||
switch (event) { | ||
case RawSocketEvent.read: | ||
|
Oops, something went wrong.