Pass in a non-null CertVerifier into SSLClientSocket.
commit9bbf3290520788bfe634a286a30965cd43f4dd78
authordavidben <davidben@chromium.org>
Fri, 24 Apr 2015 21:50:06 +0000 (24 14:50 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 24 Apr 2015 21:50:05 +0000 (24 21:50 +0000)
treef0cbfaa93f55bfdf4e5d69afdebf9a530cc152ed
parent9ba360de4cee36a01a5f5b3b7c5cd6e65eb6748b
Pass in a non-null CertVerifier into SSLClientSocket.

SslHmacChannelAuthenticator passes in a null one which crashes but the
IsAllowedBadCert check, as well as inconsistent ability to use X509Certificate
in the sandbox masks the issue most of the time.

This also fixes FakeStreamSocket to propogate disconnects to the peer, which is
needed to add a test for this case. (If SSLClientSocket doesn't like a
certificate, it just ceremoniously disconnects the connection right after the
handshake.) This test crashed before this CL outside the sandbox. (Inside the
sandbox, it's possible that it worked on some platforms due to the sandbox
breaking net::X509Certificate. I didn't do a survey.)

BUG=none

Review URL: https://codereview.chromium.org/1080593003

Cr-Commit-Position: refs/heads/master@{#326886}
net/socket/ssl_client_socket_nss.cc
net/socket/ssl_client_socket_openssl.cc
remoting/protocol/fake_stream_socket.cc
remoting/protocol/fake_stream_socket.h
remoting/protocol/message_reader_unittest.cc
remoting/protocol/ssl_hmac_channel_authenticator.cc
remoting/protocol/ssl_hmac_channel_authenticator.h
remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc