OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_CERT_NSS_PROFILE_FILTER_CHROMEOS |
| 6 #define NET_CERT_NSS_PROFILE_FILTER_CHROMEOS |
| 7 |
| 8 #include "base/callback_forward.h" |
| 9 #include "crypto/scoped_nss_types.h" |
| 10 #include "net/base/crypto_module.h" |
| 11 #include "net/cert/x509_certificate.h" |
| 12 |
| 13 namespace content { |
| 14 class ResourceContext; |
| 15 } // namespace content |
| 16 |
| 17 namespace net { |
| 18 |
| 19 class NET_EXPORT NSSProfileFilterChromeOS { |
| 20 public: |
| 21 NSSProfileFilterChromeOS(); |
| 22 ~NSSProfileFilterChromeOS(); |
| 23 |
| 24 // Initialize with slot handles. |
| 25 void Init(crypto::ScopedPK11Slot public_slot, |
| 26 crypto::ScopedPK11Slot private_slot); |
| 27 |
| 28 bool IsModuleAllowed(PK11SlotInfo* slot) const; |
| 29 bool IsCertAllowed(const scoped_refptr<X509Certificate>& cert) const; |
| 30 |
| 31 class CertNotAllowedForProfilePredicate { |
| 32 public: |
| 33 explicit CertNotAllowedForProfilePredicate( |
| 34 const NSSProfileFilterChromeOS& filter); |
| 35 bool operator()(const scoped_refptr<X509Certificate>& cert) const; |
| 36 |
| 37 private: |
| 38 const NSSProfileFilterChromeOS& filter_; |
| 39 }; |
| 40 |
| 41 class ModuleNotAllowedForProfilePredicate { |
| 42 public: |
| 43 explicit ModuleNotAllowedForProfilePredicate( |
| 44 const NSSProfileFilterChromeOS& filter); |
| 45 bool operator()(const scoped_refptr<CryptoModule>& module) const; |
| 46 |
| 47 private: |
| 48 const NSSProfileFilterChromeOS& filter_; |
| 49 }; |
| 50 |
| 51 private: |
| 52 crypto::ScopedPK11Slot public_slot_; |
| 53 crypto::ScopedPK11Slot private_slot_; |
| 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(NSSProfileFilterChromeOS); |
| 56 }; |
| 57 |
| 58 } // namespace net |
| 59 |
| 60 #endif // NET_CERT_NSS_PROFILE_FILTER_CHROMEOS |
OLD | NEW |