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_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_ | 5 #ifndef NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_ |
6 #define NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_ | 6 #define NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "crypto/scoped_nss_types.h" | 9 #include "crypto/scoped_nss_types.h" |
10 #include "net/base/crypto_module.h" | 10 #include "net/base/crypto_module.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 // slots and the root CA module. | 29 // slots and the root CA module. |
30 NSSProfileFilterChromeOS(); | 30 NSSProfileFilterChromeOS(); |
31 NSSProfileFilterChromeOS(const NSSProfileFilterChromeOS& other); | 31 NSSProfileFilterChromeOS(const NSSProfileFilterChromeOS& other); |
32 ~NSSProfileFilterChromeOS(); | 32 ~NSSProfileFilterChromeOS(); |
33 | 33 |
34 NSSProfileFilterChromeOS& operator=(const NSSProfileFilterChromeOS& other); | 34 NSSProfileFilterChromeOS& operator=(const NSSProfileFilterChromeOS& other); |
35 | 35 |
36 // Initialize the filter with the slot handles to allow. This method is not | 36 // Initialize the filter with the slot handles to allow. This method is not |
37 // thread-safe. | 37 // thread-safe. |
38 void Init(crypto::ScopedPK11Slot public_slot, | 38 void Init(crypto::ScopedPK11Slot public_slot, |
39 crypto::ScopedPK11Slot private_slot); | 39 crypto::ScopedPK11Slot private_slot, |
| 40 crypto::ScopedPK11Slot system_slot); |
40 | 41 |
41 bool IsModuleAllowed(PK11SlotInfo* slot) const; | 42 bool IsModuleAllowed(PK11SlotInfo* slot) const; |
42 bool IsCertAllowed(CERTCertificate* cert) const; | 43 bool IsCertAllowed(CERTCertificate* cert) const; |
43 | 44 |
44 class CertNotAllowedForProfilePredicate { | 45 class CertNotAllowedForProfilePredicate { |
45 public: | 46 public: |
46 explicit CertNotAllowedForProfilePredicate( | 47 explicit CertNotAllowedForProfilePredicate( |
47 const NSSProfileFilterChromeOS& filter); | 48 const NSSProfileFilterChromeOS& filter); |
48 bool operator()(const scoped_refptr<X509Certificate>& cert) const; | 49 bool operator()(const scoped_refptr<X509Certificate>& cert) const; |
49 | 50 |
50 private: | 51 private: |
51 const NSSProfileFilterChromeOS& filter_; | 52 const NSSProfileFilterChromeOS& filter_; |
52 }; | 53 }; |
53 | 54 |
54 class ModuleNotAllowedForProfilePredicate { | 55 class ModuleNotAllowedForProfilePredicate { |
55 public: | 56 public: |
56 explicit ModuleNotAllowedForProfilePredicate( | 57 explicit ModuleNotAllowedForProfilePredicate( |
57 const NSSProfileFilterChromeOS& filter); | 58 const NSSProfileFilterChromeOS& filter); |
58 bool operator()(const scoped_refptr<CryptoModule>& module) const; | 59 bool operator()(const scoped_refptr<CryptoModule>& module) const; |
59 | 60 |
60 private: | 61 private: |
61 const NSSProfileFilterChromeOS& filter_; | 62 const NSSProfileFilterChromeOS& filter_; |
62 }; | 63 }; |
63 | 64 |
64 private: | 65 private: |
65 crypto::ScopedPK11Slot public_slot_; | 66 crypto::ScopedPK11Slot public_slot_; |
66 crypto::ScopedPK11Slot private_slot_; | 67 crypto::ScopedPK11Slot private_slot_; |
| 68 crypto::ScopedPK11Slot system_slot_; |
67 }; | 69 }; |
68 | 70 |
69 } // namespace net | 71 } // namespace net |
70 | 72 |
71 #endif // NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_ | 73 #endif // NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_ |
OLD | NEW |