| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ | 5 #ifndef CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ |
| 6 #define CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ | 6 #define CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 // Fill |map| with the certificates matching |filter_type|. | 77 // Fill |map| with the certificates matching |filter_type|. |
| 78 void FilterAndBuildOrgGroupingMap(net::CertType filter_type, | 78 void FilterAndBuildOrgGroupingMap(net::CertType filter_type, |
| 79 OrgGroupingMap* map) const; | 79 OrgGroupingMap* map) const; |
| 80 | 80 |
| 81 // Get the data to be displayed in |column| for the given |cert|. | 81 // Get the data to be displayed in |column| for the given |cert|. |
| 82 base::string16 GetColumnText(const net::X509Certificate& cert, Column column)
const; | 82 base::string16 GetColumnText(const net::X509Certificate& cert, Column column)
const; |
| 83 | 83 |
| 84 // Import private keys and certificates from PKCS #12 encoded | 84 // Import private keys and certificates from PKCS #12 encoded |
| 85 // |data|, using the given |password|. If |is_extractable| is false, | 85 // |data|, using the given |password|. If |is_extractable| is false, |
| 86 // mark the private key as unextractable from the module. | 86 // mark the private key as unextractable from the slot. |
| 87 // Returns a net error code on failure. | 87 // Returns a net error code on failure. |
| 88 int ImportFromPKCS12(net::CryptoModule* module, const std::string& data, | 88 int ImportFromPKCS12(PK11SlotInfo* slot_info, const std::string& data, |
| 89 const base::string16& password, bool is_extractable); | 89 const base::string16& password, bool is_extractable); |
| 90 | 90 |
| 91 // Import user certificate from DER encoded |data|. | 91 // Import user certificate from DER encoded |data|. |
| 92 // Returns a net error code on failure. | 92 // Returns a net error code on failure. |
| 93 int ImportUserCert(const std::string& data); | 93 int ImportUserCert(const std::string& data); |
| 94 | 94 |
| 95 // Import CA certificates. | 95 // Import CA certificates. |
| 96 // Tries to import all the certificates given. The root will be trusted | 96 // Tries to import all the certificates given. The root will be trusted |
| 97 // according to |trust_bits|. Any certificates that could not be imported | 97 // according to |trust_bits|. Any certificates that could not be imported |
| 98 // will be listed in |not_imported|. | 98 // will be listed in |not_imported|. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 // Certificate provider used to fetch extension provided certificates. | 186 // Certificate provider used to fetch extension provided certificates. |
| 187 std::unique_ptr<chromeos::CertificateProvider> | 187 std::unique_ptr<chromeos::CertificateProvider> |
| 188 extension_certificate_provider_; | 188 extension_certificate_provider_; |
| 189 | 189 |
| 190 base::WeakPtrFactory<CertificateManagerModel> weak_ptr_factory_; | 190 base::WeakPtrFactory<CertificateManagerModel> weak_ptr_factory_; |
| 191 | 191 |
| 192 DISALLOW_COPY_AND_ASSIGN(CertificateManagerModel); | 192 DISALLOW_COPY_AND_ASSIGN(CertificateManagerModel); |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 #endif // CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ | 195 #endif // CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ |
| OLD | NEW |