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

Side by Side Diff: net/ssl/client_key_store.h

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: . Created 3 years, 6 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_CLIENT_KEY_STORE_H_ 5 #ifndef NET_SSL_CLIENT_KEY_STORE_H_
6 #define NET_SSL_CLIENT_KEY_STORE_H_ 6 #define NET_SSL_CLIENT_KEY_STORE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
15 #include "net/base/net_export.h" 15 #include "net/base/net_export.h"
16 16
17 namespace net { 17 namespace net {
18 18
19 class SSLPrivateKey; 19 class SSLPrivateKey;
20 class X509Certificate; 20 class X509Certificate;
21 21
22 // TODO(mattm): This is now used only by
23 // chrome/browser/chromeos/net/client_cert_store_chromeos.cc. Move it to
24 // chrome/browser/chromeos/net, or just have client_cert_store_chromeos.cc
25 // directly call whatever.
22 // TODO(rsleevi, davidben): Remove this once https://crbug.com/394131 is fixed. 26 // TODO(rsleevi, davidben): Remove this once https://crbug.com/394131 is fixed.
23 // A certificate and key store that allows several external certificate 27 // A certificate and key store that allows several external certificate
24 // providers to expose certificates and keys through this store. All currently 28 // providers to expose certificates and keys through this store. All currently
25 // provided certificates will be accessible through |FetchClientCertPrivateKey|. 29 // provided certificates will be accessible through |FetchClientCertPrivateKey|.
26 // Methods of this singleton can be called from any thread. 30 // Methods of this singleton can be called from any thread.
davidben 2017/06/01 23:41:25 Yeah, these two TODOs are two parts of the same co
mattm 2017/06/02 04:04:20 You probably didn't look at the chromeos extension
davidben 2017/06/07 23:06:16 Hrm. Well, if we could at least avoid a mess of gl
mattm 2017/06/12 21:28:30 FYI, I have a followup CL to delete ClientKeyStore
27 class NET_EXPORT ClientKeyStore { 31 class NET_EXPORT ClientKeyStore {
28 public: 32 public:
29 class CertKeyProvider { 33 class CertKeyProvider {
30 public: 34 public:
31 // This can be called from any thread. 35 // This can be called from any thread.
32 virtual ~CertKeyProvider() {} 36 virtual ~CertKeyProvider() {}
33 37
34 // Obtains a handle to the certificate private key for |cert| and stores it 38 // Obtains a handle to the certificate private key for |cert| and stores it
35 // in |private_key|. 39 // in |private_key|.
36 // If the CertKeyProvider does not know about the |cert|, returns false. If 40 // If the CertKeyProvider does not know about the |cert|, returns false. If
(...skipping 28 matching lines...) Expand all
65 69
66 base::Lock lock_; 70 base::Lock lock_;
67 std::vector<CertKeyProvider*> providers_; 71 std::vector<CertKeyProvider*> providers_;
68 72
69 DISALLOW_COPY_AND_ASSIGN(ClientKeyStore); 73 DISALLOW_COPY_AND_ASSIGN(ClientKeyStore);
70 }; 74 };
71 75
72 } // namespace net 76 } // namespace net
73 77
74 #endif // NET_SSL_CLIENT_KEY_STORE_H_ 78 #endif // NET_SSL_CLIENT_KEY_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698