Index: net/socket/ssl_client_socket_openssl_unittest.cc |
diff --git a/net/socket/ssl_client_socket_openssl_unittest.cc b/net/socket/ssl_client_socket_openssl_unittest.cc |
index 91c9a93aa7eb3c1af8b230436d79c002dd5df4b2..87cbbc4500659c52d5527ba0d88cdb217a249139 100644 |
--- a/net/socket/ssl_client_socket_openssl_unittest.cc |
+++ b/net/socket/ssl_client_socket_openssl_unittest.cc |
@@ -64,35 +64,6 @@ typedef crypto::ScopedOpenSSL<BIGNUM, BN_free> ScopedBIGNUM; |
const SSLConfig kDefaultSSLConfig; |
-// A ServerBoundCertStore that always returns an error when asked for a |
-// certificate. |
-class FailingServerBoundCertStore : public ServerBoundCertStore { |
- virtual int GetServerBoundCert(const std::string& server_identifier, |
- base::Time* expiration_time, |
- std::string* private_key_result, |
- std::string* cert_result, |
- const GetCertCallback& callback) OVERRIDE { |
- return ERR_UNEXPECTED; |
- } |
- virtual void SetServerBoundCert(const std::string& server_identifier, |
- base::Time creation_time, |
- base::Time expiration_time, |
- const std::string& private_key, |
- const std::string& cert) OVERRIDE {} |
- virtual void DeleteServerBoundCert(const std::string& server_identifier, |
- const base::Closure& completion_callback) |
- OVERRIDE {} |
- virtual void DeleteAllCreatedBetween(base::Time delete_begin, |
- base::Time delete_end, |
- const base::Closure& completion_callback) |
- OVERRIDE {} |
- virtual void DeleteAll(const base::Closure& completion_callback) OVERRIDE {} |
- virtual void GetAllServerBoundCerts(const GetCertListCallback& callback) |
- OVERRIDE {} |
- virtual int GetCertCount() OVERRIDE { return 0; } |
- virtual void SetForceKeepSessionState() OVERRIDE {} |
-}; |
- |
// Loads a PEM-encoded private key file into a scoped EVP_PKEY object. |
// |filepath| is the private key file path. |
// |*pkey| is reset to the new EVP_PKEY on success, untouched otherwise. |
@@ -141,20 +112,6 @@ class SSLClientSocketOpenSSLClientAuthTest : public PlatformTest { |
} |
protected: |
- void EnabledChannelID() { |
- cert_service_.reset( |
- new ServerBoundCertService(new DefaultServerBoundCertStore(NULL), |
- base::MessageLoopProxy::current())); |
- context_.server_bound_cert_service = cert_service_.get(); |
- } |
- |
- void EnabledFailingChannelID() { |
- cert_service_.reset( |
- new ServerBoundCertService(new FailingServerBoundCertStore(), |
- base::MessageLoopProxy::current())); |
- context_.server_bound_cert_service = cert_service_.get(); |
- } |
- |
scoped_ptr<SSLClientSocket> CreateSSLClientSocket( |
scoped_ptr<StreamSocket> transport_socket, |
const HostPortPair& host_and_port, |
@@ -323,45 +280,6 @@ TEST_F(SSLClientSocketOpenSSLClientAuthTest, SendGoodCert) { |
sock_->Disconnect(); |
EXPECT_FALSE(sock_->IsConnected()); |
} |
- |
-// Connect to a server using channel id. It should allow the connection. |
-TEST_F(SSLClientSocketOpenSSLClientAuthTest, SendChannelID) { |
- SpawnedTestServer::SSLOptions ssl_options; |
- |
- ASSERT_TRUE(ConnectToTestServer(ssl_options)); |
- |
- EnabledChannelID(); |
- SSLConfig ssl_config = kDefaultSSLConfig; |
- ssl_config.channel_id_enabled = true; |
- |
- int rv; |
- ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv)); |
- |
- EXPECT_EQ(OK, rv); |
- EXPECT_TRUE(sock_->IsConnected()); |
- EXPECT_TRUE(sock_->WasChannelIDSent()); |
- |
- sock_->Disconnect(); |
- EXPECT_FALSE(sock_->IsConnected()); |
-} |
- |
-// Connect to a server using channel id but without sending a key. It should |
-// fail. |
-TEST_F(SSLClientSocketOpenSSLClientAuthTest, FailingChannelID) { |
- SpawnedTestServer::SSLOptions ssl_options; |
- |
- ASSERT_TRUE(ConnectToTestServer(ssl_options)); |
- |
- EnabledFailingChannelID(); |
- SSLConfig ssl_config = kDefaultSSLConfig; |
- ssl_config.channel_id_enabled = true; |
- |
- int rv; |
- ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv)); |
- |
- EXPECT_EQ(ERR_UNEXPECTED, rv); |
- EXPECT_FALSE(sock_->IsConnected()); |
-} |
#endif // defined(USE_OPENSSL_CERTS) |
} // namespace |