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

Unified Diff: sdk/lib/io/secure_socket.dart

Issue 1721283002: Implements secure sockets on Mac OS with SecureTransport API (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 9 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 | « runtime/bin/secure_socket_unsupported.cc ('k') | sdk/lib/io/security_context.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/secure_socket.dart
diff --git a/sdk/lib/io/secure_socket.dart b/sdk/lib/io/secure_socket.dart
index cf8dec0eb80aa287d07e544611304a26d36b0c80..c271d77794f12673e56372aed54a7ba0279b3739 100644
--- a/sdk/lib/io/secure_socket.dart
+++ b/sdk/lib/io/secure_socket.dart
@@ -970,8 +970,16 @@ class _RawSecureSocket extends Stream<RawSocketEvent>
return _IOService._dispatch(_SSL_PROCESS_FILTER, args).then((response) {
if (response.length == 2) {
- _reportError(new TlsException('${response[1]} error ${response[0]}'),
- null);
+ if (wasInHandshake) {
+ // If we're in handshake, throw a handshake error.
+ _reportError(
+ new HandshakeException('${response[1]} error ${response[0]}'),
+ null);
+ } else {
+ // If we're connected, throw a TLS error.
+ _reportError(new TlsException('${response[1]} error ${response[0]}'),
+ null);
+ }
}
int start(int index) => response[2 * index];
int end(int index) => response[2 * index + 1];
« no previous file with comments | « runtime/bin/secure_socket_unsupported.cc ('k') | sdk/lib/io/security_context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698