summaryrefslogtreecommitdiffstats
path: root/net/socket/ssl_client_socket_unittest.cc
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 19:55:27 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 19:55:27 +0000
commit4f4de7e6e1393bf1b068337cdf8895e91addfa72 (patch)
tree872947e61b717b7ad582a2c5688e2bdb1e0b2b1f /net/socket/ssl_client_socket_unittest.cc
parentf7002808992b52e582dd2fff531863de7b673b9e (diff)
downloadchromium_src-4f4de7e6e1393bf1b068337cdf8895e91addfa72.zip
chromium_src-4f4de7e6e1393bf1b068337cdf8895e91addfa72.tar.gz
chromium_src-4f4de7e6e1393bf1b068337cdf8895e91addfa72.tar.bz2
Correctly handle SSL Client Authentication requests when connecting
to an HTTPS/SPDY proxy. Modify SSLClientSocket classes to correctly set the host_and_port field of the cert_request_info. Modify HttpNetworkTransaction to use this field when populating the SSL client auth cache. BUG=59292 TEST=HttpProxyClientSocketPoolTest.SslClientAuth Review URL: http://codereview.chromium.org/4339001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65976 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/ssl_client_socket_unittest.cc')
-rw-r--r--net/socket/ssl_client_socket_unittest.cc33
1 files changed, 11 insertions, 22 deletions
diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc
index 3a1bd5ba..e736d5b 100644
--- a/net/socket/ssl_client_socket_unittest.cc
+++ b/net/socket/ssl_client_socket_unittest.cc
@@ -67,8 +67,7 @@ TEST_F(SSLClientSocketTest, Connect) {
scoped_ptr<net::SSLClientSocket> sock(
socket_factory_->CreateSSLClientSocket(
- transport, test_server.host_port_pair().host(), kDefaultSSLConfig,
- NULL));
+ transport, test_server.host_port_pair(), kDefaultSSLConfig, NULL));
EXPECT_FALSE(sock->IsConnected());
@@ -105,8 +104,7 @@ TEST_F(SSLClientSocketTest, ConnectExpired) {
scoped_ptr<net::SSLClientSocket> sock(
socket_factory_->CreateSSLClientSocket(
- transport, test_server.host_port_pair().host(), kDefaultSSLConfig,
- NULL));
+ transport, test_server.host_port_pair(), kDefaultSSLConfig, NULL));
EXPECT_FALSE(sock->IsConnected());
@@ -145,8 +143,7 @@ TEST_F(SSLClientSocketTest, ConnectMismatched) {
scoped_ptr<net::SSLClientSocket> sock(
socket_factory_->CreateSSLClientSocket(
- transport, test_server.host_port_pair().host(), kDefaultSSLConfig,
- NULL));
+ transport, test_server.host_port_pair(), kDefaultSSLConfig, NULL));
EXPECT_FALSE(sock->IsConnected());
@@ -189,8 +186,7 @@ TEST_F(SSLClientSocketTest, FLAKY_ConnectClientAuthCertRequested) {
scoped_ptr<net::SSLClientSocket> sock(
socket_factory_->CreateSSLClientSocket(
- transport, test_server.host_port_pair().host(), kDefaultSSLConfig,
- NULL));
+ transport, test_server.host_port_pair(), kDefaultSSLConfig, NULL));
EXPECT_FALSE(sock->IsConnected());
@@ -232,8 +228,7 @@ TEST_F(SSLClientSocketTest, ConnectClientAuthSendNullCert) {
scoped_ptr<net::SSLClientSocket> sock(
socket_factory_->CreateSSLClientSocket(
- transport, test_server.host_port_pair().host(), ssl_config,
- NULL));
+ transport, test_server.host_port_pair(), ssl_config, NULL));
EXPECT_FALSE(sock->IsConnected());
@@ -275,8 +270,7 @@ TEST_F(SSLClientSocketTest, Read) {
scoped_ptr<net::SSLClientSocket> sock(
socket_factory_->CreateSSLClientSocket(
- transport, test_server.host_port_pair().host(), kDefaultSSLConfig,
- NULL));
+ transport, test_server.host_port_pair(), kDefaultSSLConfig, NULL));
rv = sock->Connect(&callback);
if (rv == net::ERR_IO_PENDING)
@@ -331,8 +325,7 @@ TEST_F(SSLClientSocketTest, Read_FullDuplex) {
scoped_ptr<net::SSLClientSocket> sock(
socket_factory_->CreateSSLClientSocket(
- transport, test_server.host_port_pair().host(), kDefaultSSLConfig,
- NULL));
+ transport, test_server.host_port_pair(), kDefaultSSLConfig, NULL));
rv = sock->Connect(&callback);
if (rv == net::ERR_IO_PENDING)
@@ -386,8 +379,7 @@ TEST_F(SSLClientSocketTest, Read_SmallChunks) {
scoped_ptr<net::SSLClientSocket> sock(
socket_factory_->CreateSSLClientSocket(
- transport, test_server.host_port_pair().host(), kDefaultSSLConfig,
- NULL));
+ transport, test_server.host_port_pair(), kDefaultSSLConfig, NULL));
rv = sock->Connect(&callback);
if (rv == net::ERR_IO_PENDING)
@@ -437,8 +429,7 @@ TEST_F(SSLClientSocketTest, Read_Interrupted) {
scoped_ptr<net::SSLClientSocket> sock(
socket_factory_->CreateSSLClientSocket(
- transport, test_server.host_port_pair().host(), kDefaultSSLConfig,
- NULL));
+ transport, test_server.host_port_pair(), kDefaultSSLConfig, NULL));
rv = sock->Connect(&callback);
if (rv == net::ERR_IO_PENDING)
@@ -508,8 +499,7 @@ TEST_F(SSLClientSocketTest, PrematureApplicationData) {
scoped_ptr<net::SSLClientSocket> sock(
socket_factory_->CreateSSLClientSocket(
- transport, test_server.host_port_pair().host(), kDefaultSSLConfig,
- NULL));
+ transport, test_server.host_port_pair(), kDefaultSSLConfig, NULL));
rv = sock->Connect(&callback);
EXPECT_EQ(net::ERR_SSL_PROTOCOL_ERROR, rv);
@@ -558,8 +548,7 @@ TEST_F(SSLClientSocketTest, MAYBE_CipherSuiteDisables) {
scoped_ptr<net::SSLClientSocket> sock(
socket_factory_->CreateSSLClientSocket(
- transport, test_server.host_port_pair().host(),
- ssl_config, NULL));
+ transport, test_server.host_port_pair(), ssl_config, NULL));
EXPECT_FALSE(sock->IsConnected());