dart:io | Add documentation for the default root certificate database for secure networking.

BUG=dartbug.com/8229, dartbug.com/8250
R=lrn@google.com

Review URL: https://codereview.chromium.org//16081005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23460 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
whesse@google.com 2013-05-31 09:08:51 +00:00
parent 27f9a7e53c
commit 9f4ce201ce

View file

@ -149,23 +149,30 @@ abstract class SecureSocket implements Socket {
* arguments. * arguments.
* *
* The optional argument [database] is the path to a certificate database * The optional argument [database] is the path to a certificate database
* containing root certificates for verifying certificate paths on * directory containing root certificates for verifying certificate paths on
* client connections, and server certificates to provide on server * client connections, and server certificates to provide on server
* connections. The argument [password] should be used when creating * connections. The argument [password] should be used when creating
* secure server sockets, to allow the private key of the server * secure server sockets, to allow the private key of the server
* certificate to be fetched. If [useBuiltinRoots] is true (the default), * certificate to be fetched. If [useBuiltinRoots] is true (the default),
* then a built-in set of root certificates for trusted certificate * then a built-in set of root certificates for trusted certificate
* authorities is merged with the certificates in the database. * authorities is merged with the certificates in the database.
* The list of built-in root certificates, and documentation about this
* default database, is available at
* http://www.mozilla.org/projects/security/certs/included/ .
*
* If the [database] argument is omitted, then only the
* builtin root certificates are used. If [useBuiltinRoots] is also false,
* then no certificates are available.
* *
* Examples: * Examples:
* 1) Use only the builtin root certificates: * 1) Use only the builtin root certificates:
* SecureSocket.initialize(); or * SecureSocket.initialize(); or
* *
* 2) Use a specified database and the builtin roots: * 2) Use a specified database directory and the builtin roots:
* SecureSocket.initialize(database: 'path/to/my/database', * SecureSocket.initialize(database: 'path/to/my/database',
* password: 'my_password'); * password: 'my_password');
* *
* 3) Use a specified database, without builtin roots: * 3) Use a specified database directory, without builtin roots:
* SecureSocket.initialize(database: 'path/to/my/database', * SecureSocket.initialize(database: 'path/to/my/database',
* password: 'my_password'. * password: 'my_password'.
* useBuiltinRoots: false); * useBuiltinRoots: false);