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

Unified Diff: runtime/bin/secure_socket_patch.dart

Issue 1757453002: Rolls back fix of SecurityContext method names. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « CHANGELOG.md ('k') | sdk/lib/io/http.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/secure_socket_patch.dart
diff --git a/runtime/bin/secure_socket_patch.dart b/runtime/bin/secure_socket_patch.dart
index ccfc1c1e78d8c5368e9cee9eb4b549773fae8650..455b132db155a940eea31dd37cfab002c33125ef 100644
--- a/runtime/bin/secure_socket_patch.dart
+++ b/runtime/bin/secure_socket_patch.dart
@@ -137,49 +137,34 @@ class _SecurityContext
static final SecurityContext defaultContext =
new _SecurityContext().._trustBuiltinRoots();
- void usePrivateKey(String keyFile, {String password}) {
- usePrivateKeySync(keyFile, password: password);
- }
- void usePrivateKeySync(String keyFile, {String password}) {
- List<int> bytes = (new File(keyFile)).readAsBytesSync();
+ void usePrivateKey(String file, {String password}) {
+ List<int> bytes = (new File(file)).readAsBytesSync();
usePrivateKeyBytes(bytes, password: password);
}
void usePrivateKeyBytes(List<int> keyBytes, {String password})
native "SecurityContext_UsePrivateKeyBytes";
void setTrustedCertificates(String file, {String password}) {
- setTrustedCertificatesSync(file, password: password);
- }
- void setTrustedCertificatesSync(String file, {String password}) {
List<int> bytes = (new File(file)).readAsBytesSync();
setTrustedCertificatesBytes(bytes, password: password);
}
void setTrustedCertificatesBytes(List<int> certBytes, {String password})
native "SecurityContext_SetTrustedCertificatesBytes";
- void useCertificateChain({String file, String directory, String password}) {
- if (directory != null) {
- throw new UnsupportedError(
- "The directory argument to useCertificateChain is not supported.");
- }
- useCertificateChainSync(file, password: password);
- }
- void useCertificateChainSync(String chainFile, {String password}) {
- List<int> bytes = (new File(chainFile)).readAsBytesSync();
+ void useCertificateChain(String file, {String password}) {
+ List<int> bytes = (new File(file)).readAsBytesSync();
useCertificateChainBytes(bytes, password: password);
}
void useCertificateChainBytes(List<int> chainBytes, {String password})
native "SecurityContext_UseCertificateChainBytes";
void setClientAuthorities(String file, {String password}) {
- setClientAuthoritiesSync(file, password: password);
- }
- void setClientAuthoritiesSync(String file, {String password}) {
List<int> bytes = (new File(file)).readAsBytesSync();
setClientAuthoritiesBytes(bytes, password: password);
}
void setClientAuthoritiesBytes(List<int> authCertBytes, {String password})
native "SecurityContext_SetClientAuthoritiesBytes";
+
void setAlpnProtocols(List<String> protocols, bool isServer) {
Uint8List encodedProtocols =
SecurityContext._protocolsToLengthEncoding(protocols);
« no previous file with comments | « CHANGELOG.md ('k') | sdk/lib/io/http.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698