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

Side by Side Diff: sdk/lib/io/secure_socket.dart

Issue 1842703003: Fixes handling of short reads/writes for Mac SSL (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
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 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 if (_status == HANDSHAKE) { 866 if (_status == HANDSHAKE) {
867 throw new HandshakeException( 867 throw new HandshakeException(
868 'Connection terminated during handshake'); 868 'Connection terminated during handshake');
869 } 869 }
870 } 870 }
871 _closeHandler(); 871 _closeHandler();
872 } 872 }
873 if (_status == CLOSED) return; 873 if (_status == CLOSED) return;
874 if (_filterStatus.progress) { 874 if (_filterStatus.progress) {
875 _filterPending = true; 875 _filterPending = true;
876 if (_filterStatus.writeEncryptedNoLongerEmpty) _writeSocket();
Ivan Posva 2016/03/29 17:14:17 {}s
zra 2016/03/29 17:29:20 Done.
876 if (_filterStatus.writePlaintextNoLongerFull) _sendWriteEvent(); 877 if (_filterStatus.writePlaintextNoLongerFull) _sendWriteEvent();
877 if (_filterStatus.readEncryptedNoLongerFull) _readSocket(); 878 if (_filterStatus.readEncryptedNoLongerFull) _readSocket();
878 if (_filterStatus.writeEncryptedNoLongerEmpty) _writeSocket();
879 if (_filterStatus.readPlaintextNoLongerEmpty) _scheduleReadEvent(); 879 if (_filterStatus.readPlaintextNoLongerEmpty) _scheduleReadEvent();
880 if (_status == HANDSHAKE) _secureHandshake(); 880 if (_status == HANDSHAKE) _secureHandshake();
881 } 881 }
882 _tryFilter(); 882 _tryFilter();
883 }).catchError(_reportError); 883 }).catchError(_reportError);
884 } 884 }
885 } 885 }
886 886
887 List<int> _readSocketOrBufferedData(int bytes) { 887 List<int> _readSocketOrBufferedData(int bytes) {
888 if (_bufferedData != null) { 888 if (_bufferedData != null) {
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 /** 1234 /**
1235 * An exception that happens in the handshake phase of establishing 1235 * An exception that happens in the handshake phase of establishing
1236 * a secure network connection, when looking up or verifying a 1236 * a secure network connection, when looking up or verifying a
1237 * certificate. 1237 * certificate.
1238 */ 1238 */
1239 class CertificateException extends TlsException { 1239 class CertificateException extends TlsException {
1240 const CertificateException([String message = "", 1240 const CertificateException([String message = "",
1241 OSError osError = null]) 1241 OSError osError = null])
1242 : super._("CertificateException", message, osError); 1242 : super._("CertificateException", message, osError);
1243 } 1243 }
OLDNEW
« runtime/bin/secure_socket_macos.cc ('K') | « runtime/bin/secure_socket_macos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698