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

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

Issue 21716004: dart:io | Add SecureSocket.importPrivateCertificates, that reads a PKCS#12 file. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add more API functions, tests 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 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 */ factory SecureSocket._(RawSecureSocket rawSocket) => 6 /* patch */ factory SecureSocket._(RawSecureSocket rawSocket) =>
7 new _SecureSocket(rawSocket); 7 new _SecureSocket(rawSocket);
8 8
9 /* patch */ static void initialize({String database, 9 /* patch */ static void initialize({String database,
10 String password, 10 String password,
11 bool useBuiltinRoots: true}) 11 bool useBuiltinRoots: true,
12 bool readOnly: true})
12 native "SecureSocket_InitializeLibrary"; 13 native "SecureSocket_InitializeLibrary";
13 14
14 /* patch */ static X509Certificate addCertificate(List<int> certificate, 15 /* patch */ static X509Certificate addCertificate(List<int> certificate,
15 String trust) 16 String trust)
16 native "SecureSocket_AddCertificate"; 17 native "SecureSocket_AddCertificate";
18
19 /* patch */ static importPrivateCertificates(List<int> certificates,
20 String password)
21 native "SecureSocket_ImportPrivateCertificates";
22
23 /* patch */ static X509Certificate changeTrust(String nicknameOrDN,
24 String trust)
25 native "SecureSocket_ChangeTrust";
26
27 /* patch */ static removeCertificate(String nicknameOrDN)
28 native "SecureSocket_RemoveCertificate";
17 } 29 }
18 30
19 31
20 patch class _SecureFilter { 32 patch class _SecureFilter {
21 /* patch */ factory _SecureFilter() => new _SecureFilterImpl(); 33 /* patch */ factory _SecureFilter() => new _SecureFilterImpl();
22 34
23 /* patch */ static SendPort _newServicePort() 35 /* patch */ static SendPort _newServicePort()
24 native "SecureSocket_NewServicePort"; 36 native "SecureSocket_NewServicePort";
25 } 37 }
26 38
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 native "SecureSocket_RegisterBadCertificateCallback"; 120 native "SecureSocket_RegisterBadCertificateCallback";
109 121
110 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler) 122 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler)
111 native "SecureSocket_RegisterHandshakeCompleteCallback"; 123 native "SecureSocket_RegisterHandshakeCompleteCallback";
112 124
113 // This is a security issue, as it exposes a raw pointer to Dart code. 125 // This is a security issue, as it exposes a raw pointer to Dart code.
114 int _pointer() native "SecureSocket_FilterPointer"; 126 int _pointer() native "SecureSocket_FilterPointer";
115 127
116 List<_ExternalBuffer> buffers; 128 List<_ExternalBuffer> buffers;
117 } 129 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698