mirror of
https://github.com/dart-lang/sdk
synced 2024-10-02 23:59:16 +00:00
Removed SecurityContext.alpnSupported, as ALPN is now supported on all platforms. Also updated CHANGELOG.md to announce its removal.
BUG= R=zra@google.com Review-Url: https://codereview.chromium.org/2926153004 .
This commit is contained in:
parent
c3d8a42e3c
commit
4b6fa0d5fb
|
@ -11,6 +11,8 @@
|
|||
`X509Certificate` to be consistent across all platforms. All
|
||||
`SecureSocket`, `SecurityContext`, and `X509Certificate` properties and
|
||||
methods are now supported on iOS and OSX.
|
||||
* Removed `SecurityContext.alpnSupported` as ALPN is now supported on all
|
||||
platforms.
|
||||
|
||||
### Dart VM
|
||||
|
||||
|
|
|
@ -459,11 +459,6 @@ class SecurityContext {
|
|||
static SecurityContext get defaultContext {
|
||||
throw new UnsupportedError("default SecurityContext getter");
|
||||
}
|
||||
|
||||
@patch
|
||||
static bool get alpnSupported {
|
||||
throw new UnsupportedError("SecurityContext alpnSupported getter");
|
||||
}
|
||||
}
|
||||
|
||||
@patch
|
||||
|
|
|
@ -116,7 +116,6 @@ namespace bin {
|
|||
V(SecureSocket_Renegotiate, 4) \
|
||||
V(SecurityContext_Allocate, 1) \
|
||||
V(SecurityContext_UsePrivateKeyBytes, 3) \
|
||||
V(SecurityContext_AlpnSupported, 0) \
|
||||
V(SecurityContext_SetAlpnProtocols, 3) \
|
||||
V(SecurityContext_SetClientAuthoritiesBytes, 3) \
|
||||
V(SecurityContext_SetTrustedCertificatesBytes, 3) \
|
||||
|
|
|
@ -129,11 +129,6 @@ class SecurityContext {
|
|||
static SecurityContext get defaultContext {
|
||||
return _SecurityContext.defaultContext;
|
||||
}
|
||||
|
||||
@patch
|
||||
static bool get alpnSupported {
|
||||
return _SecurityContext.alpnSupported;
|
||||
}
|
||||
}
|
||||
|
||||
class _SecurityContext extends NativeFieldWrapperClass1
|
||||
|
@ -179,8 +174,6 @@ class _SecurityContext extends NativeFieldWrapperClass1
|
|||
void setClientAuthoritiesBytes(List<int> authCertBytes, {String password})
|
||||
native "SecurityContext_SetClientAuthoritiesBytes";
|
||||
|
||||
static bool get alpnSupported => _alpnSupported();
|
||||
static bool _alpnSupported() native "SecurityContext_AlpnSupported";
|
||||
void setAlpnProtocols(List<String> protocols, bool isServer) {
|
||||
Uint8List encodedProtocols =
|
||||
SecurityContext._protocolsToLengthEncoding(protocols);
|
||||
|
|
|
@ -135,12 +135,6 @@ void FUNCTION_NAME(SecurityContext_SetTrustedCertificatesBytes)(
|
|||
}
|
||||
|
||||
|
||||
void FUNCTION_NAME(SecurityContext_AlpnSupported)(Dart_NativeArguments args) {
|
||||
Dart_ThrowException(DartUtils::NewDartArgumentError(
|
||||
"Secure Sockets unsupported on this platform"));
|
||||
}
|
||||
|
||||
|
||||
void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)(
|
||||
Dart_NativeArguments args) {
|
||||
Dart_ThrowException(DartUtils::NewDartArgumentError(
|
||||
|
|
|
@ -809,11 +809,6 @@ void FUNCTION_NAME(SecurityContext_UseCertificateChainBytes)(
|
|||
}
|
||||
|
||||
|
||||
void FUNCTION_NAME(SecurityContext_AlpnSupported)(Dart_NativeArguments args) {
|
||||
Dart_SetReturnValue(args, Dart_NewBoolean(true));
|
||||
}
|
||||
|
||||
|
||||
void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)(
|
||||
Dart_NativeArguments args) {
|
||||
SSLCertContext* context = SSLCertContext::GetSecurityContext(args);
|
||||
|
|
|
@ -459,11 +459,6 @@ class SecurityContext {
|
|||
static SecurityContext get defaultContext {
|
||||
throw new UnsupportedError("default SecurityContext getter");
|
||||
}
|
||||
|
||||
@patch
|
||||
static bool get alpnSupported {
|
||||
throw new UnsupportedError("SecurityContext alpnSupported getter");
|
||||
}
|
||||
}
|
||||
|
||||
@patch
|
||||
|
|
|
@ -148,11 +148,6 @@ abstract class SecurityContext {
|
|||
*/
|
||||
void setClientAuthoritiesBytes(List<int> authCertBytes, {String password});
|
||||
|
||||
/**
|
||||
* Whether the platform supports ALPN.
|
||||
*/
|
||||
external static bool get alpnSupported;
|
||||
|
||||
/**
|
||||
* Sets the list of application-level protocols supported by a client
|
||||
* connection or server connection. The ALPN (application level protocol
|
||||
|
|
|
@ -125,9 +125,6 @@ void testInvalidArgumentClientConnect(
|
|||
}
|
||||
|
||||
main() {
|
||||
if (!SecurityContext.alpnSupported) {
|
||||
return 0;
|
||||
}
|
||||
final longname256 = 'p' * 256;
|
||||
final String longname255 = 'p' * 255;
|
||||
final String strangelongname255 = 'ø' + 'p' * 253;
|
||||
|
|
Loading…
Reference in a new issue