Chromium Code Reviews| Index: net/ssl/ssl_platform_key_nss.cc |
| diff --git a/net/ssl/ssl_platform_key_nss.cc b/net/ssl/ssl_platform_key_nss.cc |
| index 25332104c9e57d28d95bfa4e4bcfcdb30edc394a..8eaff2bf94861c72b6f4eee88952f74af8bb5087 100644 |
| --- a/net/ssl/ssl_platform_key_nss.cc |
| +++ b/net/ssl/ssl_platform_key_nss.cc |
| @@ -20,6 +20,7 @@ |
| #include "crypto/scoped_openssl_types.h" |
| #include "net/cert/x509_certificate.h" |
| #include "net/ssl/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" |
| @@ -160,9 +161,10 @@ class SSLPlatformKeyNSS : public ThreadedSSLPrivateKey::Delegate { |
| } // namespace |
| -scoped_ptr<SSLPrivateKey> FetchClientCertPrivateKey( |
| - X509Certificate* certificate, |
| - scoped_refptr<base::SequencedTaskRunner> task_runner) { |
| +scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey( |
| + X509Certificate* certificate) { |
| + if (!certificate->os_cert_handle()) |
| + return nullptr; |
|
davidben
2015/11/04 00:17:38
See resource_loader_unittest.cc comment.
svaldez
2015/11/04 16:55:52
Done.
|
| crypto::ScopedSECKEYPrivateKey key( |
| PK11_FindKeyByAnyCert(certificate->os_cert_handle(), nullptr)); |
| if (!key) { |
| @@ -183,9 +185,9 @@ scoped_ptr<SSLPrivateKey> FetchClientCertPrivateKey( |
| LOG(ERROR) << "Unknown key type: " << nss_type; |
| return nullptr; |
| } |
| - return make_scoped_ptr(new ThreadedSSLPrivateKey( |
| + return make_scoped_refptr(new ThreadedSSLPrivateKey( |
| make_scoped_ptr(new SSLPlatformKeyNSS(type, key.Pass())), |
| - task_runner.Pass())); |
| + GetSSLPlatformKeyTaskRunner())); |
| } |
| } // namespace net |