OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CERT_STORE_CHROMEOS_H_ | 5 #ifndef NET_SSL_CLIENT_CERT_STORE_CHROMEOS_H_ |
6 #define NET_SSL_CLIENT_CERT_STORE_CHROMEOS_H_ | 6 #define NET_SSL_CLIENT_CERT_STORE_CHROMEOS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "crypto/scoped_nss_types.h" | 10 #include "crypto/scoped_nss_types.h" |
11 #include "net/cert/nss_profile_filter_chromeos.h" | 11 #include "net/cert/nss_profile_filter_chromeos.h" |
12 #include "net/ssl/client_cert_store_nss.h" | 12 #include "net/ssl/client_cert_store_nss.h" |
13 | 13 |
14 namespace net { | 14 namespace net { |
15 | 15 |
16 class NET_EXPORT ClientCertStoreChromeOS : public ClientCertStoreNSS { | 16 class NET_EXPORT ClientCertStoreChromeOS : public ClientCertStoreNSS { |
17 public: | 17 public: |
18 // Always accesses client certs of the user's private and public slot. If | |
19 // |use_system_slot| is true, also accesses the system slot. | |
Ryan Sleevi
2014/07/29 00:23:16
This comment seems confusing.
// Constructs a Cli
pneubeck (no reviews)
2014/07/29 16:00:15
Done.
| |
18 ClientCertStoreChromeOS( | 20 ClientCertStoreChromeOS( |
21 bool use_system_slot, | |
19 const std::string& username_hash, | 22 const std::string& username_hash, |
20 const PasswordDelegateFactory& password_delegate_factory); | 23 const PasswordDelegateFactory& password_delegate_factory); |
21 virtual ~ClientCertStoreChromeOS(); | 24 virtual ~ClientCertStoreChromeOS(); |
22 | 25 |
23 // ClientCertStoreNSS: | 26 // ClientCertStoreNSS: |
24 virtual void GetClientCerts(const SSLCertRequestInfo& cert_request_info, | 27 virtual void GetClientCerts(const SSLCertRequestInfo& cert_request_info, |
25 CertificateList* selected_certs, | 28 CertificateList* selected_certs, |
26 const base::Closure& callback) OVERRIDE; | 29 const base::Closure& callback) OVERRIDE; |
27 | 30 |
28 protected: | 31 protected: |
29 // ClientCertStoreNSS: | 32 // ClientCertStoreNSS: |
30 virtual void GetClientCertsImpl(CERTCertList* cert_list, | 33 virtual void GetClientCertsImpl(CERTCertList* cert_list, |
31 const SSLCertRequestInfo& request, | 34 const SSLCertRequestInfo& request, |
32 bool query_nssdb, | 35 bool query_nssdb, |
33 CertificateList* selected_certs) OVERRIDE; | 36 CertificateList* selected_certs) OVERRIDE; |
34 | 37 |
35 private: | 38 private: |
36 friend class ClientCertStoreChromeOSTestDelegate; | 39 void DidGetPrivateAndSystemSlot(const SSLCertRequestInfo* request, |
40 CertificateList* selected_certs, | |
41 const base::Closure& callback, | |
42 crypto::ScopedPK11Slot system_slot, | |
43 crypto::ScopedPK11Slot private_slot); | |
37 | 44 |
38 void DidGetPrivateSlot(const SSLCertRequestInfo* request, | 45 bool use_system_slot_; |
39 CertificateList* selected_certs, | |
40 const base::Closure& callback, | |
41 crypto::ScopedPK11Slot private_slot); | |
42 | |
43 std::string username_hash_; | 46 std::string username_hash_; |
44 NSSProfileFilterChromeOS profile_filter_; | 47 NSSProfileFilterChromeOS profile_filter_; |
45 | 48 |
46 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreChromeOS); | 49 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreChromeOS); |
47 }; | 50 }; |
48 | 51 |
49 } // namespace net | 52 } // namespace net |
50 | 53 |
51 #endif // NET_SSL_CLIENT_CERT_STORE_CHROMEOS_H_ | 54 #endif // NET_SSL_CLIENT_CERT_STORE_CHROMEOS_H_ |
OLD | NEW |