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 | 4 |
5 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
6 import "dart:io"; | 6 import "dart:io"; |
7 | 7 |
8 String localFile(path) => Platform.script.resolve(path).toFilePath(); | 8 String localFile(path) => Platform.script.resolve(path).toFilePath(); |
9 | 9 |
10 bool printException(e) { print(e); return true; } | 10 bool printException(e) { print(e); return true; } |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 tlsException); | 109 tlsException); |
110 Expect.throws(() => c.useCertificateChain( | 110 Expect.throws(() => c.useCertificateChain( |
111 localFile('certificates/server_chain_malformed1.pem')), | 111 localFile('certificates/server_chain_malformed1.pem')), |
112 tlsException); | 112 tlsException); |
113 Expect.throws(() => c.useCertificateChain( | 113 Expect.throws(() => c.useCertificateChain( |
114 localFile('certificates/server_chain_malformed2.pem')), | 114 localFile('certificates/server_chain_malformed2.pem')), |
115 tlsException); | 115 tlsException); |
116 Expect.throws(() => c.setClientAuthorities( | 116 Expect.throws(() => c.setClientAuthorities( |
117 localFile('certificates/client_authority_malformed.pem')), | 117 localFile('certificates/client_authority_malformed.pem')), |
118 tlsException); | 118 tlsException); |
119 | |
120 c.usePrivateKey( | |
121 localFile('certificates/server_key.pem'), password: "dartdart"); | |
122 } | 119 } |
123 | 120 |
124 void main() { | 121 void main() { |
125 testUsePrivateKeyArguments(); | 122 testUsePrivateKeyArguments(); |
126 } | 123 } |
OLD | NEW |