| 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 CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 // Returns true when the certificate list has been requested but not loaded. | 57 // Returns true when the certificate list has been requested but not loaded. |
| 58 bool CertificatesLoading() const; | 58 bool CertificatesLoading() const; |
| 59 | 59 |
| 60 // Returns true when the certificate list has been initiailized. | 60 // Returns true when the certificate list has been initiailized. |
| 61 bool CertificatesLoaded() const; | 61 bool CertificatesLoaded() const; |
| 62 | 62 |
| 63 // Returns true if the TPM is available for hardware-backed certificates. | 63 // Returns true if the TPM is available for hardware-backed certificates. |
| 64 bool IsHardwareBacked() const; | 64 bool IsHardwareBacked() const; |
| 65 | 65 |
| 66 // Returns the id of the slot that contains the user certificates. |
| 67 std::string GetTPMSlotID() const; |
| 68 |
| 66 // Retruns the number of certificates available for |type|. | 69 // Retruns the number of certificates available for |type|. |
| 67 int NumCertificates(CertType type) const; | 70 int NumCertificates(CertType type) const; |
| 68 | 71 |
| 69 // Retreives the certificate property for |type| at |index|. | 72 // Retreives the certificate property for |type| at |index|. |
| 70 base::string16 GetCertDisplayStringAt(CertType type, int index) const; | 73 base::string16 GetCertDisplayStringAt(CertType type, int index) const; |
| 71 std::string GetServerCACertPEMAt(int index) const; | 74 std::string GetServerCACertPEMAt(int index) const; |
| 72 std::string GetUserCertPkcs11IdAt(int index) const; | 75 std::string GetUserCertPkcs11IdAt(int index) const; |
| 73 bool IsCertHardwareBackedAt(CertType type, int index) const; | 76 bool IsCertHardwareBackedAt(CertType type, int index) const; |
| 74 | 77 |
| 75 // Returns the index of a Certificate matching |pem_encoded| or -1 if none | 78 // Returns the index of a Certificate matching |pem_encoded| or -1 if none |
| (...skipping 23 matching lines...) Expand all Loading... |
| 99 net::CertificateList user_certs_; | 102 net::CertificateList user_certs_; |
| 100 net::CertificateList server_certs_; | 103 net::CertificateList server_certs_; |
| 101 net::CertificateList server_ca_certs_; | 104 net::CertificateList server_ca_certs_; |
| 102 | 105 |
| 103 DISALLOW_COPY_AND_ASSIGN(CertLibrary); | 106 DISALLOW_COPY_AND_ASSIGN(CertLibrary); |
| 104 }; | 107 }; |
| 105 | 108 |
| 106 } // namespace chromeos | 109 } // namespace chromeos |
| 107 | 110 |
| 108 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ | 111 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ |
| OLD | NEW |