Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: tests/standalone/io/certificate_test_client_database.dart

Issue 22887014: Remove the certificate management methods from dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/certificate_test_client.dart ('k') | tests/standalone/io/delete_a_directory_later.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/certificate_test_client_database.dart
diff --git a/tests/standalone/io/certificate_test_client_database.dart b/tests/standalone/io/certificate_test_client_database.dart
deleted file mode 100644
index 9723a6ab0d60bd1739f5e693f39a634f245b21a9..0000000000000000000000000000000000000000
--- a/tests/standalone/io/certificate_test_client_database.dart
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-//
-// Client that tests that a certificate authority certificate loaded
-// at runtime can be used to verify a certificate chain. The server it
-// connects to uses localhost_cert, signed by myauthority_cert, to connect
-// securely. This client tests that addCertificate works if a certificate
-// database has been specified.
-
-import 'dart:io';
-
-void main() {
- int port = int.parse(new Options().arguments[0]);
- String certificate = new Options().arguments[1];
- String database = new Options().arguments[2];
- SecureSocket.initialize(database: database,
- password: 'dartdart',
- readOnly: false);
- SecureSocket.removeCertificate('localhost_cert');
- SecureSocket.removeCertificate('myauthority_cert');
- var mycert = new File(certificate).readAsBytesSync();
- SecureSocket.addCertificate(mycert,
- SecureSocket.TRUST_ISSUE_SERVER_CERTIFICATES);
- if (null != SecureSocket.getCertificate('myauthority_cert')) {
- throw "Expected getCertificate to return null";
- }
- SecureSocket.connect('localhost', port).then((SecureSocket socket) {
- socket.writeln('hello world');
- socket.listen((data) { });
- return socket.close();
- }).then((_) {
- // The certificate is only in the in-memory cache, so cannot be removed.
- try {
- SecureSocket.removeCertificate('myauthority_cert');
- } catch (e) {
- if (e is! CertificateException) throw "error $e";
- }
- }).then((_) {
- print('SUCCESS'); // Checked by parent process.
- });
-}
« no previous file with comments | « tests/standalone/io/certificate_test_client.dart ('k') | tests/standalone/io/delete_a_directory_later.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698