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

Unified Diff: lib/io/tls_socket.dart

Issue 10916081: Add secure sockets to dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Switch to system of patched libraries in dart:io for new TlsSocket class. Created 8 years, 2 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
Index: lib/io/tls_socket.dart
diff --git a/lib/io/tls_socket.dart b/lib/io/tls_socket.dart
new file mode 100644
index 0000000000000000000000000000000000000000..4ce8bc1d88e1ef69d1f6f70f4dc132f32039d560
--- /dev/null
+++ b/lib/io/tls_socket.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2012, 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.
+
+abstract class TlsSocket implements Socket {
+ /**
+ * Constructs a new secure socket and connect it to the given
+ * host on the given port. The returned socket is not yet connected
+ * but ready for registration of callbacks.
+ */
+ external factory TlsSocket(String host, int port);
+
+ /**
+ * Initializes the TLS library with the path to a certificate database
+ * containing root certificates for verifying certificate paths on
+ * client connections, and server certificates to provide on server
+ * connections.
+ */
+ external static void setCertificateDatabase(String pkcertDirectory);
+}

Powered by Google App Engine
This is Rietveld 408576698