| 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);
|
|
|