OLD | NEW |
---|---|
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart.io; | 5 part of dart.io; |
6 | 6 |
7 /** | 7 /** |
8 * A high-level class for communicating securely over a TCP socket, using | 8 * A high-level class for communicating securely over a TCP socket, using |
9 * TLS and SSL. The [SecureSocket] exposes both a [Stream] and an | 9 * TLS and SSL. The [SecureSocket] exposes both a [Stream] and an |
10 * [IOSink] interface, making it ideal for using together with | 10 * [IOSink] interface, making it ideal for using together with |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
439 onBadCertificate, | 439 onBadCertificate, |
440 supportedProtocols) | 440 supportedProtocols) |
441 ._handshakeComplete.future; | 441 ._handshakeComplete.future; |
442 } | 442 } |
443 | 443 |
444 _RawSecureSocket( | 444 _RawSecureSocket( |
445 this.address, | 445 this.address, |
446 int requestedPort, | 446 int requestedPort, |
447 this.is_server, | 447 this.is_server, |
448 this.context, | 448 this.context, |
449 RawSocket this._socket, | 449 this._socket, |
450 this._socketSubscription, | 450 this._socketSubscription, |
451 this._bufferedData, | 451 this._bufferedData, |
452 this.requestClientCertificate, | 452 this.requestClientCertificate, |
453 this.requireClientCertificate, | 453 this.requireClientCertificate, |
454 this.onBadCertificate(X509Certificate certificate), | 454 this.onBadCertificate, |
Vyacheslav Egorov (Google)
2017/02/17 13:08:52
This was a more specific signature then onBadCerti
ahe
2017/02/17 13:38:28
I'm comfortable removing type annotations from Dar
| |
455 List<String> supportedProtocols) { | 455 List<String> supportedProtocols) { |
456 if (context == null) { | 456 if (context == null) { |
457 context = SecurityContext.defaultContext; | 457 context = SecurityContext.defaultContext; |
458 } | 458 } |
459 _controller = new StreamController<RawSocketEvent>( | 459 _controller = new StreamController<RawSocketEvent>( |
460 sync: true, | 460 sync: true, |
461 onListen: _onSubscriptionStateChange, | 461 onListen: _onSubscriptionStateChange, |
462 onPause: _onPauseStateChange, | 462 onPause: _onPauseStateChange, |
463 onResume: _onPauseStateChange, | 463 onResume: _onPauseStateChange, |
464 onCancel: _onSubscriptionStateChange); | 464 onCancel: _onSubscriptionStateChange); |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1248 /** | 1248 /** |
1249 * An exception that happens in the handshake phase of establishing | 1249 * An exception that happens in the handshake phase of establishing |
1250 * a secure network connection, when looking up or verifying a | 1250 * a secure network connection, when looking up or verifying a |
1251 * certificate. | 1251 * certificate. |
1252 */ | 1252 */ |
1253 class CertificateException extends TlsException { | 1253 class CertificateException extends TlsException { |
1254 const CertificateException([String message = "", | 1254 const CertificateException([String message = "", |
1255 OSError osError = null]) | 1255 OSError osError = null]) |
1256 : super._("CertificateException", message, osError); | 1256 : super._("CertificateException", message, osError); |
1257 } | 1257 } |
OLD | NEW |