Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Unified Diff: net/ssl/ssl_platform_key.h

Issue 1304143010: Plumbing SSLPrivateKey Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/ssl/ssl_platform_key.h
diff --git a/net/ssl/ssl_platform_key.h b/net/ssl/ssl_platform_key.h
index bcab6a4c32d0c9b355fe364915ca1095fb4eba89..08a5a33508018326b3d8dc2227f1b27ff316c4d1 100644
--- a/net/ssl/ssl_platform_key.h
+++ b/net/ssl/ssl_platform_key.h
@@ -5,8 +5,15 @@
#ifndef NET_SSL_SSL_PLATFORM_KEY_H_
#define NET_SSL_SSL_PLATFORM_KEY_H_
+#include "base/lazy_instance.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "net/base/net_export.h"
+#include "net/ssl/ssl_platform_key_task_runner.h"
davidben 2015/09/25 20:10:11 Unnecessary? (Move to cc files.)
svaldez 2015/09/28 16:54:53 Done.
+
+#if defined(OS_ANDROID)
+#include "crypto/scoped_openssl_types.h"
+#endif
namespace base {
class SequencedTaskRunner;
@@ -14,16 +21,22 @@ class SequencedTaskRunner;
namespace net {
+class SSLPlatformKeyTaskRunner;
davidben 2015/09/25 20:10:12 Unnecessary?
svaldez 2015/09/28 16:54:53 Done.
class SSLPrivateKey;
class X509Certificate;
+#if defined(OS_ANDROID)
+// Wraps a ScopedEVP_PKEY into an SSLPrivateKey.
+NET_EXPORT scoped_refptr<SSLPrivateKey> WrapPrivateKey(
davidben 2015/09/25 20:10:11 I'd probably call this WrapEVP_PKEY or WrapOpenSSL
svaldez 2015/09/28 16:54:53 Done.
+ crypto::ScopedEVP_PKEY key);
+#endif
+
// Looks up the private key from the platform key store corresponding to
// |certificate|'s public key and returns an SSLPrivateKey which offloads
-// signing operations to |task_runner|. |task_runner| is a SequencedTaskRunner
-// to allow for buggy third-party smartcard drivers.
-scoped_ptr<SSLPrivateKey> FetchClientCertPrivateKey(
- X509Certificate* certificate,
- scoped_refptr<base::SequencedTaskRunner> task_runner);
+// signing operations to the |g_platform_key_task_runner| to account for
+// buggy smartcards.
+NET_EXPORT scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey(
+ X509Certificate* certificate);
davidben 2015/09/25 20:10:12 This doesn't exist on OS_ANDROID, right? Probably
svaldez 2015/09/28 16:54:53 Done.
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698