diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-03 19:04:22 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-03 19:04:22 +0000 |
commit | daec85b78d9354c6f24186e367e5b34219f50cc4 (patch) | |
tree | 1f4871b8ecb07fb3426268c7bdadfdb0d74aeabf /net/socket/ssl_client_socket_win.cc | |
parent | 26b57dab5a70e40471876913604f570e96acd1a6 (diff) | |
download | chromium_src-daec85b78d9354c6f24186e367e5b34219f50cc4.zip chromium_src-daec85b78d9354c6f24186e367e5b34219f50cc4.tar.gz chromium_src-daec85b78d9354c6f24186e367e5b34219f50cc4.tar.bz2 |
Enable the regression test for issue 42538 for Windows.
This requires mapping SEC_E_INVALID_TOKEN to ERR_SSL_PROTOCOL_ERROR.
We were mapping SEC_E_INVALID_TOKEN to ERR_UNEXPECTED because
previously I got SEC_E_INVALID_TOKEN when I called
InitializeSecurityContext at the wrong time. If we call
InitializeSecurityContext correctly, SEC_E_INVALID_TOKEN indicates
an invalid SSL record.
R=agl
BUG=42538
TEST=the unit test SSLClientSocketTest.PrematureApplicationData
should pass on Windows.
Review URL: http://codereview.chromium.org/1718022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46260 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/ssl_client_socket_win.cc')
-rw-r--r-- | net/socket/ssl_client_socket_win.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/socket/ssl_client_socket_win.cc b/net/socket/ssl_client_socket_win.cc index 1d014ab..7fd1f7c 100644 --- a/net/socket/ssl_client_socket_win.cc +++ b/net/socket/ssl_client_socket_win.cc @@ -825,6 +825,12 @@ int SSLClientSocketWin::DoHandshakeReadComplete(int result) { &out_flags, &expiry); + if (isc_status_ == SEC_E_INVALID_TOKEN) { + // Peer sent us an SSL record type that's invalid during SSL handshake. + // TODO(wtc): move this to MapSecurityError after sufficient testing. + return ERR_SSL_PROTOCOL_ERROR; + } + if (send_buffer_.cbBuffer != 0 && (isc_status_ == SEC_E_OK || isc_status_ == SEC_I_CONTINUE_NEEDED || |