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

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

Issue 1852783003: Implements remaining SecurityContext calls for iOS (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 8 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
« no previous file with comments | « sdk/lib/io/secure_socket.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/security_context.dart
diff --git a/sdk/lib/io/security_context.dart b/sdk/lib/io/security_context.dart
index 190957185789d3b0455d96780a24bd5d0d8ce748..d99b05b6f8d93be294b03c1c30326fe717f88020 100644
--- a/sdk/lib/io/security_context.dart
+++ b/sdk/lib/io/security_context.dart
@@ -48,7 +48,10 @@ abstract class SecurityContext {
* NB: This function calls [ReadFileAsBytesSync], and will block on file IO.
* Prefer using [usePrivateKeyBytes].
*
- * iOS note: Not yet implemented.
+ * iOS note: Only PKCS12 data is supported. It should contain both the private
+ * key and the certificate chain. On iOS one call to [usePrivateKey] with this
+ * data is used instead of two calls to [useCertificateChain] and
+ * [usePrivateKey].
*/
void usePrivateKey(String file, {String password});
@@ -57,8 +60,6 @@ abstract class SecurityContext {
*
* Like [usePrivateKey], but takes the contents of the file as a list
* of bytes.
- *
- * iOS note: Not yet implemented.
*/
void usePrivateKeyBytes(List<int> keyBytes, {String password});
@@ -74,6 +75,13 @@ abstract class SecurityContext {
*
* NB: This function calls [ReadFileAsBytesSync], and will block on file IO.
* Prefer using [setTrustedCertificatesBytes].
+ *
+ * iOS note: On iOS, this call takes only the bytes for a single DER
+ * encoded X509 certificate. It may be called multiple times to add
+ * multiple trusted certificates to the context. A DER encoded certificate
+ * can be obtained from a PEM encoded certificate by using the openssl tool:
+ *
+ * $ openssl x509 -outform der -in cert.pem -out cert.der
*/
void setTrustedCertificates(String file, {String password});
@@ -82,13 +90,6 @@ abstract class SecurityContext {
* client connections, when connecting to a secure server.
*
* Like [setTrustedCertificates] but takes the contents of the file.
- *
- * iOS note: On iOS, this call takes only the bytes for a single DER
- * encoded X509 certificate. It may be called multiple times to add
- * multiple trusted certificates to the context. A DER encoded certificate
- * can be obtained from a PEM encoded certificate by using the openssl tool:
- *
- * $ openssl x509 -outform der -in cert.pem -out cert.der
*/
void setTrustedCertificatesBytes(List<int> certBytes, {String password});
@@ -107,7 +108,8 @@ abstract class SecurityContext {
* NB: This function calls [ReadFileAsBytesSync], and will block on file IO.
* Prefer using [useCertificateChainBytes].
*
- * iOS note: Not yet implemented.
+ * iOS note: As noted above, [usePrivateKey] does the job of both
+ * that call and this one. On iOS, this call is a no-op.
*/
void useCertificateChain(String file, {String password});
@@ -116,8 +118,6 @@ abstract class SecurityContext {
* when making secure connections, including the server certificate.
*
* Like [useCertificateChain] but takes the contents of the file.
- *
- * iOS note: Not yet implemented.
*/
void useCertificateChainBytes(List<int> chainBytes, {String password});
@@ -135,7 +135,7 @@ abstract class SecurityContext {
* NB: This function calls [ReadFileAsBytesSync], and will block on file IO.
* Prefer using [setClientAuthoritiesBytes].
*
- * iOS note: Not yet implemented.
+ * iOS note: This call is not supported.
*/
void setClientAuthorities(String file, {String password});
@@ -145,8 +145,6 @@ abstract class SecurityContext {
* client.
*
* Like [setClientAuthority] but takes the contents of the file.
- *
- * iOS note: Not yet implemented.
*/
void setClientAuthoritiesBytes(List<int> authCertBytes, {String password});
« no previous file with comments | « sdk/lib/io/secure_socket.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698