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

Side by Side 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, 2 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 unified diff | Download patch
OLDNEW
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 #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.
13
14 #if defined(OS_ANDROID)
15 #include "crypto/scoped_openssl_types.h"
16 #endif
10 17
11 namespace base { 18 namespace base {
12 class SequencedTaskRunner; 19 class SequencedTaskRunner;
13 } 20 }
14 21
15 namespace net { 22 namespace net {
16 23
24 class SSLPlatformKeyTaskRunner;
davidben 2015/09/25 20:10:12 Unnecessary?
svaldez 2015/09/28 16:54:53 Done.
17 class SSLPrivateKey; 25 class SSLPrivateKey;
18 class X509Certificate; 26 class X509Certificate;
19 27
28 #if defined(OS_ANDROID)
29 // Wraps a ScopedEVP_PKEY into an SSLPrivateKey.
30 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.
31 crypto::ScopedEVP_PKEY key);
32 #endif
33
20 // Looks up the private key from the platform key store corresponding to 34 // Looks up the private key from the platform key store corresponding to
21 // |certificate|'s public key and returns an SSLPrivateKey which offloads 35 // |certificate|'s public key and returns an SSLPrivateKey which offloads
22 // signing operations to |task_runner|. |task_runner| is a SequencedTaskRunner 36 // signing operations to the |g_platform_key_task_runner| to account for
23 // to allow for buggy third-party smartcard drivers. 37 // buggy smartcards.
24 scoped_ptr<SSLPrivateKey> FetchClientCertPrivateKey( 38 NET_EXPORT scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey(
25 X509Certificate* certificate, 39 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.
26 scoped_refptr<base::SequencedTaskRunner> task_runner);
27 40
28 } // namespace net 41 } // namespace net
29 42
30 #endif // NET_SSL_SSL_PLATFORM_KEY_H_ 43 #endif // NET_SSL_SSL_PLATFORM_KEY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698