Chromium Code Reviews| Index: net/socket/ssl_client_socket_mac.cc |
| diff --git a/net/socket/ssl_client_socket_mac.cc b/net/socket/ssl_client_socket_mac.cc |
| index 3aa3591dfe8b0b5667e4b466795ee4058c699dcf..1bf68a0cdbe2e40d43ec48ce952f7f52b9e4a2d7 100644 |
| --- a/net/socket/ssl_client_socket_mac.cc |
| +++ b/net/socket/ssl_client_socket_mac.cc |
| @@ -710,6 +710,10 @@ int SSLClientSocketMac::DoHandshakeStart() { |
| } |
| } |
| + if (status == errSSLClosedGraceful) |
| + // The server unexpectedly closed on us. |
| + return ERR_UNEXPECTED; |
|
wtc
2009/12/16 00:48:52
Please add curly braces {} to this if statement be
|
| + |
| int net_error = NetErrorFromOSStatus(status); |
| if (status == noErr || IsCertificateError(net_error)) { |
| server_cert_ = GetServerCert(ssl_context_); |
| @@ -765,6 +769,9 @@ int SSLClientSocketMac::DoHandshakeFinish() { |
| if (status == errSSLWouldBlock) |
| next_handshake_state_ = STATE_HANDSHAKE_FINISH; |
| + if (status == errSSLClosedGraceful) |
| + return ERR_UNEXPECTED; |
|
wtc
2009/12/16 00:48:52
Same here: please use ERR_SSL_PROTOCOL_ERROR inste
|
| + |
| if (status == noErr) { |
| completed_handshake_ = true; |
| DCHECK(next_handshake_state_ == STATE_NONE); |