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

Side by Side Diff: sdk/lib/io/security_context.dart

Issue 1663633003: Adds SecurityContext.setClientAuthoritiesBytes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 * [usePrivateKey]. 102 * [usePrivateKey].
103 */ 103 */
104 void useCertificateChainBytes(List<int> chainBytes); 104 void useCertificateChainBytes(List<int> chainBytes);
105 105
106 /** 106 /**
107 * Sets the list of authority names that a [SecureServer] will advertise 107 * Sets the list of authority names that a [SecureServer] will advertise
108 * as accepted, when requesting a client certificate from a connecting 108 * as accepted, when requesting a client certificate from a connecting
109 * client. [file] is a PEM file containing the accepted signing authority 109 * client. [file] is a PEM file containing the accepted signing authority
110 * certificates - the authority names are extracted from the certificates. 110 * certificates - the authority names are extracted from the certificates.
111 */ 111 */
112 void setClientAuthorities(String file); 112 void setClientAuthoritiesSync(String file);
113
114 /**
115 * Sets the list of authority names that a [SecureServer] will advertise
116 * as accepted, when requesting a client certificate from a connecting
117 * client. [authCertBytes] is the contents of a PEM file containing the
118 * accepted signing authority certificates - the authority names are extracted
119 * from the certificates.
120 */
121 void setClientAuthoritiesBytes(List<int> authCertBytes);
113 122
114 /** 123 /**
115 * Sets the list of application-level protocols supported by a client 124 * Sets the list of application-level protocols supported by a client
116 * connection or server connection. The ALPN (application level protocol 125 * connection or server connection. The ALPN (application level protocol
117 * negotiation) extension to TLS allows a client to send a list of 126 * negotiation) extension to TLS allows a client to send a list of
118 * protocols in the TLS client hello message, and the server to pick 127 * protocols in the TLS client hello message, and the server to pick
119 * one and send the selected one back in its server hello message. 128 * one and send the selected one back in its server hello message.
120 * 129 *
121 * Separate lists of protocols can be sent for client connections and 130 * Separate lists of protocols can be sent for client connections and
122 * for server connections, using the same SecurityContext. The [isServer] 131 * for server connections, using the same SecurityContext. The [isServer]
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } 225 }
217 226
218 if (bytes.length >= (1 << 13)) { 227 if (bytes.length >= (1 << 13)) {
219 throw new ArgumentError( 228 throw new ArgumentError(
220 'The maximum message length supported is 2^13-1.'); 229 'The maximum message length supported is 2^13-1.');
221 } 230 }
222 231
223 return new Uint8List.fromList(bytes); 232 return new Uint8List.fromList(bytes);
224 } 233 }
225 } 234 }
OLDNEW
« no previous file with comments | « runtime/bin/secure_socket_unsupported.cc ('k') | tests/standalone/io/secure_server_client_certificate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698