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

Unified Diff: sdk/lib/io/security_context.dart

Issue 1665433002: Adds SecurityContext.setTrustedCertificatesBytes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/io/security_context.dart
diff --git a/sdk/lib/io/security_context.dart b/sdk/lib/io/security_context.dart
index 4675b60048a0fbaefd2478176f73ff7f4c5cdc4b..6cf6549ccc76a94340fc6bf37da3ca56355db0a5 100644
--- a/sdk/lib/io/security_context.dart
+++ b/sdk/lib/io/security_context.dart
@@ -62,20 +62,22 @@ abstract class SecurityContext {
* Sets the set of trusted X509 certificates used by [SecureSocket]
* client connections, when connecting to a secure server.
*
- * There are two ways to set a set of trusted certificates, with a single
- * PEM file, or with a directory containing individual PEM files for
- * certificates.
- *
- * [file] is an optional PEM file containing X509 certificates, usually
+ * [file] is the path to a PEM file containing X509 certificates, usually
* root certificates from certificate authorities.
*
- * [directory] is an optional directory containing PEM files. The directory
- * must also have filesystem links added, which link extra filenames based
- * on the hash of a certificate's distinguished name (DN) to the file
- * containing that certificate. OpenSSL contains a tool called c_rehash
- * to create these links in a directory.
+ * The function returns a [Future] that completes when the certificates have
+ * been added.
+ */
+ Future setTrustedCertificates(String file);
+
+ /**
+ * Sets the set of trusted X509 certificates used by [SecureSocket]
+ * client connections, when connecting to a secure server.
+ *
+ * [file] is the contents of a PEM file containing X509 certificates, usually
+ * root certificates from certificate authorities.
*/
- void setTrustedCertificates({String file, String directory});
+ void setTrustedCertificatesBytes(List<int> certBytes);
/**
* Sets the chain of X509 certificates served by [SecureServer]

Powered by Google App Engine
This is Rietveld 408576698