Index: net/ssl/ssl_platform_key_android.cc |
diff --git a/net/ssl/ssl_platform_key_android.cc b/net/ssl/ssl_platform_key_android.cc |
index 773844a08fa01ff2c25e651de0da505d711b5fa9..9d426516254631d2b095ee17dbc63d24b96bb3f4 100644 |
--- a/net/ssl/ssl_platform_key_android.cc |
+++ b/net/ssl/ssl_platform_key_android.cc |
@@ -13,6 +13,7 @@ |
#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" |
@@ -107,12 +108,8 @@ class SSLPlatformKeyAndroid : public ThreadedSSLPrivateKey::Delegate { |
} // namespace |
-scoped_ptr<SSLPrivateKey> FetchClientCertPrivateKey( |
- X509Certificate* certificate, |
- scoped_refptr<base::SequencedTaskRunner> task_runner) { |
- crypto::ScopedEVP_PKEY key = |
- OpenSSLClientKeyStore::GetInstance()->FetchClientCertPrivateKey( |
- certificate); |
+#if false |
davidben
2015/11/04 17:03:01
Try bots are unhappy. I think you want to keep thi
|
+scoped_refptr<SSLPrivateKey> WrapOpenSSLPrivateKey(crypto::ScopedEVP_PKEY key) { |
if (!key) |
return nullptr; |
@@ -128,9 +125,18 @@ scoped_ptr<SSLPrivateKey> FetchClientCertPrivateKey( |
LOG(ERROR) << "Unknown key type: " << EVP_PKEY_id(key.get()); |
return nullptr; |
} |
- return make_scoped_ptr(new ThreadedSSLPrivateKey( |
+ return make_scoped_refptr(new ThreadedSSLPrivateKey( |
make_scoped_ptr(new SSLPlatformKeyAndroid(key.Pass(), type)), |
- task_runner.Pass())); |
+ GetSSLPlatformKeyTaskRunner())); |
+} |
+#endif |
+ |
+scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey( |
+ X509Certificate* certificate) { |
+ crypto::ScopedEVP_PKEY key = |
+ OpenSSLClientKeyStore::GetInstance()->FetchClientCertPrivateKey( |
+ certificate); |
+ return WrapOpenSSLPrivateKey(key.Pass()); |
} |
} // namespace net |