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

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

Issue 11467004: Enable client certificates in SecureSocket and SecureServerSocket (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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 patch class SecureSocket { 5 patch class SecureSocket {
6 /* patch */ static void initialize({String database, 6 /* patch */ static void initialize({String database,
7 String password, 7 String password,
8 bool useBuiltinRoots: true}) 8 bool useBuiltinRoots: true})
9 native "SecureSocket_InitializeLibrary"; 9 native "SecureSocket_InitializeLibrary";
10 } 10 }
(...skipping 19 matching lines...) Expand all
30 _SecureFilterImpl() { 30 _SecureFilterImpl() {
31 buffers = new List<_ExternalBuffer>(_SecureSocket.NUM_BUFFERS); 31 buffers = new List<_ExternalBuffer>(_SecureSocket.NUM_BUFFERS);
32 for (int i = 0; i < _SecureSocket.NUM_BUFFERS; ++i) { 32 for (int i = 0; i < _SecureSocket.NUM_BUFFERS; ++i) {
33 buffers[i] = new _ExternalBuffer(); 33 buffers[i] = new _ExternalBuffer();
34 } 34 }
35 } 35 }
36 36
37 void connect(String hostName, 37 void connect(String hostName,
38 int port, 38 int port,
39 bool is_server, 39 bool is_server,
40 String certificate_name) native "SecureSocket_Connect"; 40 String certificateName,
41 bool requestClientCertificate,
42 bool requireClientCertificate,
43 bool sendClientCertificate) native "SecureSocket_Connect";
41 44
42 void destroy() { 45 void destroy() {
43 buffers = null; 46 buffers = null;
44 _destroy(); 47 _destroy();
45 } 48 }
46 49
47 void _destroy() native "SecureSocket_Destroy"; 50 void _destroy() native "SecureSocket_Destroy";
48 51
49 void handshake() native "SecureSocket_Handshake"; 52 void handshake() native "SecureSocket_Handshake";
50 53
51 void init() native "SecureSocket_Init"; 54 void init() native "SecureSocket_Init";
52 55
56 X509Certificate get peerCertificate native "SecureSocket_PeerCertificate";
57
53 int processBuffer(int bufferIndex) native "SecureSocket_ProcessBuffer"; 58 int processBuffer(int bufferIndex) native "SecureSocket_ProcessBuffer";
54 59
55 void registerBadCertificateCallback(Function callback) 60 void registerBadCertificateCallback(Function callback)
56 native "SecureSocket_RegisterBadCertificateCallback"; 61 native "SecureSocket_RegisterBadCertificateCallback";
57 62
58 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler) 63 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler)
59 native "SecureSocket_RegisterHandshakeCompleteCallback"; 64 native "SecureSocket_RegisterHandshakeCompleteCallback";
60 65
61 List<_ExternalBuffer> buffers; 66 List<_ExternalBuffer> buffers;
62 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698