Index: net/ssl/test_ssl_private_key.cc |
diff --git a/net/ssl/ssl_platform_key_android.cc b/net/ssl/test_ssl_private_key.cc |
similarity index 83% |
copy from net/ssl/ssl_platform_key_android.cc |
copy to net/ssl/test_ssl_private_key.cc |
index 6a6595cc0e651eedcacdc97804bf3cc1f8bdd0ca..99ed33b15cd731523fb93166959f4c3ab1afbdda 100644 |
--- a/net/ssl/ssl_platform_key_android.cc |
+++ b/net/ssl/test_ssl_private_key.cc |
@@ -1,8 +1,8 @@ |
-// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "net/ssl/ssl_platform_key.h" |
+#include "net/ssl/test_ssl_private_key.h" |
#include <openssl/digest.h> |
#include <openssl/evp.h> |
@@ -12,7 +12,6 @@ |
#include "base/macros.h" |
#include "crypto/scoped_openssl_types.h" |
#include "net/base/net_errors.h" |
-#include "net/ssl/openssl_client_key_store.h" |
#include "net/ssl/ssl_platform_key_task_runner.h" |
#include "net/ssl/ssl_private_key.h" |
#include "net/ssl/threaded_ssl_private_key.h" |
@@ -21,12 +20,12 @@ namespace net { |
namespace { |
-class SSLPlatformKeyAndroid : public ThreadedSSLPrivateKey::Delegate { |
+class TestSSLPlatformKey : public ThreadedSSLPrivateKey::Delegate { |
public: |
- SSLPlatformKeyAndroid(crypto::ScopedEVP_PKEY key, SSLPrivateKey::Type type) |
+ TestSSLPlatformKey(crypto::ScopedEVP_PKEY key, SSLPrivateKey::Type type) |
: key_(std::move(key)), type_(type) {} |
- ~SSLPlatformKeyAndroid() override {} |
+ ~TestSSLPlatformKey() override {} |
SSLPrivateKey::Type GetType() override { return type_; } |
@@ -100,9 +99,11 @@ class SSLPlatformKeyAndroid : public ThreadedSSLPrivateKey::Delegate { |
crypto::ScopedEVP_PKEY key_; |
SSLPrivateKey::Type type_; |
- DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyAndroid); |
+ DISALLOW_COPY_AND_ASSIGN(TestSSLPlatformKey); |
}; |
+} // namespace |
+ |
scoped_refptr<SSLPrivateKey> WrapOpenSSLPrivateKey(crypto::ScopedEVP_PKEY key) { |
if (!key) |
return nullptr; |
@@ -120,18 +121,8 @@ scoped_refptr<SSLPrivateKey> WrapOpenSSLPrivateKey(crypto::ScopedEVP_PKEY key) { |
return nullptr; |
} |
return make_scoped_refptr(new ThreadedSSLPrivateKey( |
- make_scoped_ptr(new SSLPlatformKeyAndroid(std::move(key), type)), |
+ make_scoped_ptr(new TestSSLPlatformKey(std::move(key), type)), |
GetSSLPlatformKeyTaskRunner())); |
} |
-} // namespace |
- |
-scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey( |
- X509Certificate* certificate) { |
- crypto::ScopedEVP_PKEY key = |
- OpenSSLClientKeyStore::GetInstance()->FetchClientCertPrivateKey( |
- certificate); |
- return WrapOpenSSLPrivateKey(std::move(key)); |
-} |
- |
} // namespace net |