| 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/macros.h" | 10 #include "base/macros.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // Returns true when the certificate list has been initiailized. | 59 // Returns true when the certificate list has been initiailized. |
| 60 bool CertificatesLoaded() const; | 60 bool CertificatesLoaded() const; |
| 61 | 61 |
| 62 // Retruns the number of certificates available for |type|. | 62 // Retruns the number of certificates available for |type|. |
| 63 int NumCertificates(CertType type) const; | 63 int NumCertificates(CertType type) const; |
| 64 | 64 |
| 65 // Retreives the certificate property for |type| at |index|. | 65 // Retreives the certificate property for |type| at |index|. |
| 66 base::string16 GetCertDisplayStringAt(CertType type, int index) const; | 66 base::string16 GetCertDisplayStringAt(CertType type, int index) const; |
| 67 std::string GetServerCACertPEMAt(int index) const; | 67 std::string GetServerCACertPEMAt(int index) const; |
| 68 std::string GetUserCertPkcs11IdAt(int index, int* slot_id) const; | 68 std::string GetUserCertPkcs11IdAt(int index, int* slot_id) const; |
| 69 bool IsCertHardwareBackedAt(CertType type, int index) const; | 69 bool IsCertSecureAt(CertType type, int index) const; |
| 70 | 70 |
| 71 // Returns the index of a Certificate matching |pem_encoded| or -1 if none | 71 // Returns the index of a Certificate matching |pem_encoded| or -1 if none |
| 72 // found. This function may be slow depending on the number of stored | 72 // found. This function may be slow depending on the number of stored |
| 73 // certificates. | 73 // certificates. |
| 74 // TOOD(pneubeck): Either make this more efficient, asynchronous or get rid of | 74 // TOOD(pneubeck): Either make this more efficient, asynchronous or get rid of |
| 75 // it. | 75 // it. |
| 76 int GetServerCACertIndexByPEM(const std::string& pem_encoded) const; | 76 int GetServerCACertIndexByPEM(const std::string& pem_encoded) const; |
| 77 // Same as above but for a PKCS#11 id. | 77 // Same as above but for a PKCS#11 id. |
| 78 int GetUserCertIndexByPkcs11Id(const std::string& pkcs11_id) const; | 78 int GetUserCertIndexByPkcs11Id(const std::string& pkcs11_id) const; |
| 79 | 79 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 95 net::CertificateList user_certs_; | 95 net::CertificateList user_certs_; |
| 96 net::CertificateList server_certs_; | 96 net::CertificateList server_certs_; |
| 97 net::CertificateList server_ca_certs_; | 97 net::CertificateList server_ca_certs_; |
| 98 | 98 |
| 99 DISALLOW_COPY_AND_ASSIGN(CertLibrary); | 99 DISALLOW_COPY_AND_ASSIGN(CertLibrary); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace chromeos | 102 } // namespace chromeos |
| 103 | 103 |
| 104 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ | 104 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_CERT_LIBRARY_H_ |
| OLD | NEW |