summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-04 01:27:18 +0000
committerwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-04 01:27:18 +0000
commit26047e2a01e644b4fb1ed7ba254a5836a426acac (patch)
tree98a3c9a5dba04eb3b4f38803f2491e1ce8baa7f5 /net
parentfd354afbe32a383778d072355d9f8389acfc5f8c (diff)
downloadchromium_src-26047e2a01e644b4fb1ed7ba254a5836a426acac.zip
chromium_src-26047e2a01e644b4fb1ed7ba254a5836a426acac.tar.gz
chromium_src-26047e2a01e644b4fb1ed7ba254a5836a426acac.tar.bz2
If we didn't read enough to be able to decrypt anything,
go back to read more rather than reporting 0 bytes read, which would be interpreted as EOF. R=darin BUG=b/1329345,b/1329363 Review URL: http://codereview.chromium.org/217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/ssl_client_socket.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/base/ssl_client_socket.cc b/net/base/ssl_client_socket.cc
index dbf28da..bd1bef6 100644
--- a/net/base/ssl_client_socket.cc
+++ b/net/base/ssl_client_socket.cc
@@ -607,6 +607,10 @@ int SSLClientSocket::DoPayloadReadComplete(int result) {
}
// TODO(wtc): need to handle SEC_I_RENEGOTIATE.
DCHECK(status == SEC_E_OK);
+ // If we didn't read enough to be able to decrypt anything, don't report 0
+ // bytes read, which would be interpreted as EOF. Go back to read more.
+ if (len == 0)
+ next_state_ = STATE_PAYLOAD_READ;
return len;
}