OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 part of dart.io; | 5 part of dart.io; |
6 | 6 |
7 /** | 7 /** |
8 * The object containing the certificates to trust when making | 8 * The object containing the certificates to trust when making |
9 * a secure client connection, and the certificate chain and | 9 * a secure client connection, and the certificate chain and |
10 * private key to serve from a secure server. | 10 * private key to serve from a secure server. |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 /** | 142 /** |
143 * Sets the list of authority names that a [SecureServerSocket] will advertise | 143 * Sets the list of authority names that a [SecureServerSocket] will advertise |
144 * as accepted, when requesting a client certificate from a connecting | 144 * as accepted, when requesting a client certificate from a connecting |
145 * client. | 145 * client. |
146 * | 146 * |
147 * Like [setClientAuthorities] but takes the contents of the file. | 147 * Like [setClientAuthorities] but takes the contents of the file. |
148 */ | 148 */ |
149 void setClientAuthoritiesBytes(List<int> authCertBytes, {String password}); | 149 void setClientAuthoritiesBytes(List<int> authCertBytes, {String password}); |
150 | 150 |
151 /** | 151 /** |
| 152 * Whether the platform supports ALPN. This always returns true and will be |
| 153 * removed in a future release. |
| 154 */ |
| 155 @deprecated |
| 156 external static bool get alpnSupported; |
| 157 |
| 158 /** |
152 * Sets the list of application-level protocols supported by a client | 159 * Sets the list of application-level protocols supported by a client |
153 * connection or server connection. The ALPN (application level protocol | 160 * connection or server connection. The ALPN (application level protocol |
154 * negotiation) extension to TLS allows a client to send a list of | 161 * negotiation) extension to TLS allows a client to send a list of |
155 * protocols in the TLS client hello message, and the server to pick | 162 * protocols in the TLS client hello message, and the server to pick |
156 * one and send the selected one back in its server hello message. | 163 * one and send the selected one back in its server hello message. |
157 * | 164 * |
158 * Separate lists of protocols can be sent for client connections and | 165 * Separate lists of protocols can be sent for client connections and |
159 * for server connections, using the same SecurityContext. The [isServer] | 166 * for server connections, using the same SecurityContext. The [isServer] |
160 * boolean argument specifies whether to set the list for server connections | 167 * boolean argument specifies whether to set the list for server connections |
161 * or client connections. | 168 * or client connections. |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 } | 260 } |
254 | 261 |
255 if (bytes.length >= (1 << 13)) { | 262 if (bytes.length >= (1 << 13)) { |
256 throw new ArgumentError( | 263 throw new ArgumentError( |
257 'The maximum message length supported is 2^13-1.'); | 264 'The maximum message length supported is 2^13-1.'); |
258 } | 265 } |
259 | 266 |
260 return new Uint8List.fromList(bytes); | 267 return new Uint8List.fromList(bytes); |
261 } | 268 } |
262 } | 269 } |
OLD | NEW |