| OLD | NEW |
| 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"; | |
| 14 | |
| 15 /* patch */ static X509Certificate addCertificate(List<int> certificate, | |
| 16 String trust) | |
| 17 native "SecureSocket_AddCertificate"; | |
| 18 | |
| 19 /* patch */ static importCertificatesWithPrivateKeys(List<int> certificates, | |
| 20 String password) | |
| 21 native "SecureSocket_ImportCertificatesWithPrivateKeys"; | |
| 22 | |
| 23 /* patch */ static X509Certificate changeTrust(String nickname, | |
| 24 String trust) | |
| 25 native "SecureSocket_ChangeTrust"; | |
| 26 | |
| 27 /* patch */ static X509Certificate getCertificate(String nickname) | |
| 28 native "SecureSocket_GetCertificate"; | |
| 29 | |
| 30 /* patch */ static removeCertificate(String nickname) | |
| 31 native "SecureSocket_RemoveCertificate"; | |
| 32 } | 13 } |
| 33 | 14 |
| 34 | 15 |
| 35 patch class _SecureFilter { | 16 patch class _SecureFilter { |
| 36 /* patch */ factory _SecureFilter() => new _SecureFilterImpl(); | 17 /* patch */ factory _SecureFilter() => new _SecureFilterImpl(); |
| 37 | 18 |
| 38 /* patch */ static SendPort _newServicePort() | 19 /* patch */ static SendPort _newServicePort() |
| 39 native "SecureSocket_NewServicePort"; | 20 native "SecureSocket_NewServicePort"; |
| 40 } | 21 } |
| 41 | 22 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 native "SecureSocket_RegisterBadCertificateCallback"; | 104 native "SecureSocket_RegisterBadCertificateCallback"; |
| 124 | 105 |
| 125 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler) | 106 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler) |
| 126 native "SecureSocket_RegisterHandshakeCompleteCallback"; | 107 native "SecureSocket_RegisterHandshakeCompleteCallback"; |
| 127 | 108 |
| 128 // This is a security issue, as it exposes a raw pointer to Dart code. | 109 // This is a security issue, as it exposes a raw pointer to Dart code. |
| 129 int _pointer() native "SecureSocket_FilterPointer"; | 110 int _pointer() native "SecureSocket_FilterPointer"; |
| 130 | 111 |
| 131 List<_ExternalBuffer> buffers; | 112 List<_ExternalBuffer> buffers; |
| 132 } | 113 } |
| OLD | NEW |