| 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 3a8b52ce6aa489f4266d5ea92920bf16eb81df47..33d142c02e50012483a6f07dd85af2c406583219 100644
|
| --- a/net/socket/ssl_client_socket_openssl_unittest.cc
|
| +++ b/net/socket/ssl_client_socket_openssl_unittest.cc
|
| @@ -33,9 +33,9 @@
|
| #include "net/socket/client_socket_handle.h"
|
| #include "net/socket/socket_test_util.h"
|
| #include "net/socket/tcp_client_socket.h"
|
| -#include "net/ssl/openssl_client_key_store.h"
|
| #include "net/ssl/ssl_cert_request_info.h"
|
| #include "net/ssl/ssl_config_service.h"
|
| +#include "net/ssl/ssl_platform_key.h"
|
| #include "net/test/cert_test_util.h"
|
| #include "net/test/spawned_test_server/spawned_test_server.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -87,10 +87,9 @@ class SSLClientSocketOpenSSLClientAuthTest : public PlatformTest {
|
| cert_verifier_->set_default_result(OK);
|
| context_.cert_verifier = cert_verifier_.get();
|
| context_.transport_security_state = transport_security_state_.get();
|
| - key_store_ = OpenSSLClientKeyStore::GetInstance();
|
| }
|
|
|
| - ~SSLClientSocketOpenSSLClientAuthTest() override { key_store_->Flush(); }
|
| + ~SSLClientSocketOpenSSLClientAuthTest() override {}
|
|
|
| protected:
|
| scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
|
| @@ -131,17 +130,6 @@ class SSLClientSocketOpenSSLClientAuthTest : public PlatformTest {
|
| return true;
|
| }
|
|
|
| - // Record a certificate's private key to ensure it can be used
|
| - // by the OpenSSL-based SSLClientSocket implementation.
|
| - // |ssl_config| provides a client certificate.
|
| - // |private_key| must be an EVP_PKEY for the corresponding private key.
|
| - // Returns true on success, false on failure.
|
| - bool RecordPrivateKey(SSLConfig& ssl_config,
|
| - EVP_PKEY* private_key) {
|
| - return key_store_->RecordClientCertPrivateKey(
|
| - ssl_config.client_cert.get(), private_key);
|
| - }
|
| -
|
| // Create an SSLClientSocket object and use it to connect to a test
|
| // server, then wait for connection results. This must be called after
|
| // a succesful ConnectToTestServer() call.
|
| @@ -178,7 +166,6 @@ class SSLClientSocketOpenSSLClientAuthTest : public PlatformTest {
|
| scoped_ptr<MockCertVerifier> cert_verifier_;
|
| scoped_ptr<TransportSecurityState> transport_security_state_;
|
| SSLClientSocketContext context_;
|
| - OpenSSLClientKeyStore* key_store_;
|
| scoped_ptr<SpawnedTestServer> test_server_;
|
| AddressList addr_;
|
| TestCompletionCallback callback_;
|
| @@ -218,6 +205,7 @@ TEST_F(SSLClientSocketOpenSSLClientAuthTest, SendEmptyCert) {
|
| SSLConfig ssl_config;
|
| ssl_config.send_client_cert = true;
|
| ssl_config.client_cert = NULL;
|
| + ssl_config.client_pkey = NULL;
|
|
|
| int rv;
|
| ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv));
|
| @@ -246,8 +234,7 @@ TEST_F(SSLClientSocketOpenSSLClientAuthTest, SendGoodCert) {
|
| crypto::ScopedEVP_PKEY client_private_key;
|
| ASSERT_TRUE(LoadPrivateKeyOpenSSL(certs_dir.AppendASCII("client_1.key"),
|
| &client_private_key));
|
| - EXPECT_TRUE(RecordPrivateKey(ssl_config, client_private_key.get()));
|
| -
|
| + ssl_config.client_pkey = net::WrapPrivateKey(client_private_key.Pass());
|
| int rv;
|
| ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv));
|
|
|
|
|