OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 // |
| 5 // OtherResources=certificates/server_chain.pem |
| 6 // OtherResources=certificates/server_key.pem |
| 7 // OtherResources=certificates/server_key.p12 |
| 8 // OtherResources=certificates/client1_key_malformed.pem |
| 9 // OtherResources=certificates/trusted_certs_malformed.pem |
| 10 // OtherResources=certificates/server_chain_malformed1.pem |
| 11 // OtherResources=certificates/server_chain_malformed2.pem |
| 12 // OtherResources=certificates/client_authority_malformed.pem |
4 | 13 |
5 import "package:expect/expect.dart"; | 14 import "package:expect/expect.dart"; |
6 import "dart:io"; | 15 import "dart:io"; |
7 | 16 |
8 String localFile(path) => Platform.script.resolve(path).toFilePath(); | 17 String localFile(path) => Platform.script.resolve(path).toFilePath(); |
9 | 18 |
10 bool printException(e) { print(e); return true; } | 19 bool printException(e) { print(e); return true; } |
11 bool argumentError(e) => e is ArgumentError; | 20 bool argumentError(e) => e is ArgumentError; |
12 bool argumentOrTypeError(e) => e is ArgumentError || e is TypeError; | 21 bool argumentOrTypeError(e) => e is ArgumentError || e is TypeError; |
13 bool fileSystemException(e) => e is FileSystemException; | 22 bool fileSystemException(e) => e is FileSystemException; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 localFile('certificates/server_chain_malformed2.pem')), | 123 localFile('certificates/server_chain_malformed2.pem')), |
115 tlsException); | 124 tlsException); |
116 Expect.throws(() => c.setClientAuthorities( | 125 Expect.throws(() => c.setClientAuthorities( |
117 localFile('certificates/client_authority_malformed.pem')), | 126 localFile('certificates/client_authority_malformed.pem')), |
118 tlsException); | 127 tlsException); |
119 } | 128 } |
120 | 129 |
121 void main() { | 130 void main() { |
122 testUsePrivateKeyArguments(); | 131 testUsePrivateKeyArguments(); |
123 } | 132 } |
OLD | NEW |