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

Side by Side Diff: runtime/bin/secure_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/secure_socket.cc ('k') | runtime/bin/tls_socket.h » ('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 SecureSocket {
6 /* patch */ static void setCertificateDatabase(String certificateDatabase,
7 [String password])
8 native "SecureSocket_SetCertificateDatabase";
9 }
10
11
12 patch class _SecureFilter {
13 /* patch */ factory _SecureFilter() => new _SecureFilterImpl();
14 }
15
16
17 /**
18 * _SecureFilterImpl wraps a filter that encrypts and decrypts data travelling
19 * over an 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 _SecureFilterImpl
27 extends NativeFieldWrapperClass1
28 implements _SecureFilter {
29 _SecureFilterImpl() {
30 buffers = new List<_ExternalBuffer>(_SecureSocket.NUM_BUFFERS);
31 for (int i = 0; i < _SecureSocket.NUM_BUFFERS; ++i) {
32 buffers[i] = new _ExternalBuffer();
33 }
34 }
35
36 void connect(String hostName,
37 int port,
38 bool is_server,
39 String certificate_name) native "SecureSocket_Connect";
40
41 void destroy() {
42 buffers = null;
43 _destroy();
44 }
45
46 void _destroy() native "SecureSocket_Destroy";
47
48 void handshake() native "SecureSocket_Handshake";
49
50 void init() native "SecureSocket_Init";
51
52 int processBuffer(int bufferIndex) native "SecureSocket_ProcessBuffer";
53
54 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler)
55 native "SecureSocket_RegisterHandshakeCompleteCallback";
56
57 List<_ExternalBuffer> buffers;
58 }
OLDNEW
« no previous file with comments | « runtime/bin/secure_socket.cc ('k') | runtime/bin/tls_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698