Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_SSL_SSL_PLATFORM_KEY_H_ | 5 #ifndef NET_SSL_SSL_PLATFORM_KEY_H_ |
| 6 #define NET_SSL_SSL_PLATFORM_KEY_H_ | 6 #define NET_SSL_SSL_PLATFORM_KEY_H_ |
| 7 | 7 |
| 8 #include "base/lazy_instance.h" | |
| 8 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "net/base/net_export.h" | |
| 12 | |
| 13 #if defined(OS_ANDROID) | |
| 14 #include "crypto/scoped_openssl_types.h" | |
| 15 #endif | |
| 10 | 16 |
| 11 namespace base { | 17 namespace base { |
| 12 class SequencedTaskRunner; | 18 class SequencedTaskRunner; |
| 13 } | 19 } |
| 14 | 20 |
| 15 namespace net { | 21 namespace net { |
| 16 | 22 |
| 17 class SSLPrivateKey; | 23 class SSLPrivateKey; |
| 18 class X509Certificate; | 24 class X509Certificate; |
| 19 | 25 |
| 26 #if defined(OS_ANDROID) | |
| 27 // Wraps a ScopedEVP_PKEY into an SSLPrivateKey. | |
| 28 NET_EXPORT scoped_refptr<SSLPrivateKey> WrapOpenSSLPrivateKey( | |
| 29 crypto::ScopedEVP_PKEY key); | |
| 30 #else | |
| 20 // Looks up the private key from the platform key store corresponding to | 31 // Looks up the private key from the platform key store corresponding to |
| 21 // |certificate|'s public key and returns an SSLPrivateKey which offloads | 32 // |certificate|'s public key and returns an SSLPrivateKey which offloads |
| 22 // signing operations to |task_runner|. |task_runner| is a SequencedTaskRunner | 33 // signing operations to the |g_platform_key_task_runner| to account for |
| 23 // to allow for buggy third-party smartcard drivers. | 34 // buggy smartcards. |
|
davidben
2015/10/13 20:32:16
What is g_platform_key_task_runner? This header do
svaldez
2015/10/14 15:06:19
Done.
| |
| 24 scoped_ptr<SSLPrivateKey> FetchClientCertPrivateKey( | 35 NET_EXPORT scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey( |
| 25 X509Certificate* certificate, | 36 X509Certificate* certificate); |
| 26 scoped_refptr<base::SequencedTaskRunner> task_runner); | 37 #endif |
| 27 | 38 |
| 28 } // namespace net | 39 } // namespace net |
| 29 | 40 |
| 30 #endif // NET_SSL_SSL_PLATFORM_KEY_H_ | 41 #endif // NET_SSL_SSL_PLATFORM_KEY_H_ |
| OLD | NEW |