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

Side by Side Diff: runtime/bin/tls_socket_patch.dart

Issue 11419138: Rename TlsSocket to SecureSocket, and all other Tls... items to Secure.... (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rename C++ class from Filter to SSLFilter. Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/tls_socket.cc ('k') | sdk/lib/_internal/compiler/implementation/lib/io_patch.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
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.
4
5 patch class TlsSocket {
6 /* patch */ static void setCertificateDatabase(String certificateDatabase,
7 [String password])
8 native "TlsSocket_SetCertificateDatabase";
9 }
10
11
12 patch class _TlsFilter {
13 /* patch */ factory _TlsFilter() => new _TlsFilterImpl();
14 }
15
16
17 /**
18 * _TlsFilterImpl wraps a filter that encrypts and decrypts data travelling
19 * over a TLS encrypted socket. The filter also handles the handshaking
20 * and certificate verification.
21 *
22 * The filter exposes its input and output buffers as Dart objects that
23 * are backed by an external C array of bytes, so that both Dart code and
24 * native code can access the same data.
25 */
26 class _TlsFilterImpl extends NativeFieldWrapperClass1 implements _TlsFilter {
27 _TlsFilterImpl() {
28 buffers = new List<_TlsExternalBuffer>(_TlsSocket.NUM_BUFFERS);
29 for (int i = 0; i < _TlsSocket.NUM_BUFFERS; ++i) {
30 buffers[i] = new _TlsExternalBuffer();
31 }
32 }
33
34 void connect(String hostName,
35 int port,
36 bool is_server,
37 String certificate_name) native "TlsSocket_Connect";
38
39 void destroy() {
40 buffers = null;
41 _destroy();
42 }
43
44 void _destroy() native "TlsSocket_Destroy";
45
46 void handshake() native "TlsSocket_Handshake";
47
48 void init() native "TlsSocket_Init";
49
50 int processBuffer(int bufferIndex) native "TlsSocket_ProcessBuffer";
51
52 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler)
53 native "TlsSocket_RegisterHandshakeCompleteCallback";
54
55 List<_TlsExternalBuffer> buffers;
56 }
OLDNEW
« no previous file with comments | « runtime/bin/tls_socket.cc ('k') | sdk/lib/_internal/compiler/implementation/lib/io_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698