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 NET_BASE_CERT_DATABASE_H_ | 5 #ifndef NET_BASE_CERT_DATABASE_H_ |
6 #define NET_BASE_CERT_DATABASE_H_ | 6 #define NET_BASE_CERT_DATABASE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 ImportCertFailureList* not_imported); | 165 ImportCertFailureList* not_imported); |
166 | 166 |
167 // Get trust bits for certificate. | 167 // Get trust bits for certificate. |
168 TrustBits GetCertTrust(const X509Certificate* cert, CertType type) const; | 168 TrustBits GetCertTrust(const X509Certificate* cert, CertType type) const; |
169 | 169 |
170 // IsUntrusted returns true if |cert| is specifically untrusted. These | 170 // IsUntrusted returns true if |cert| is specifically untrusted. These |
171 // certificates are stored in the database for the specific purpose of | 171 // certificates are stored in the database for the specific purpose of |
172 // rejecting them. | 172 // rejecting them. |
173 bool IsUntrusted(const X509Certificate* cert) const; | 173 bool IsUntrusted(const X509Certificate* cert) const; |
174 | 174 |
| 175 // IsHardwareBacked returns true if |cert| is hardware backed. |
| 176 bool IsHardwareBacked(const X509Certificate* cert) const; |
| 177 |
175 // Set trust values for certificate. | 178 // Set trust values for certificate. |
176 // Returns true on success or false on failure. | 179 // Returns true on success or false on failure. |
177 bool SetCertTrust(const X509Certificate* cert, | 180 bool SetCertTrust(const X509Certificate* cert, |
178 CertType type, | 181 CertType type, |
179 TrustBits trust_bits); | 182 TrustBits trust_bits); |
180 | 183 |
181 // Delete certificate and associated private key (if one exists). | 184 // Delete certificate and associated private key (if one exists). |
182 // |cert| is still valid when this function returns. Returns true on | 185 // |cert| is still valid when this function returns. Returns true on |
183 // success. | 186 // success. |
184 bool DeleteCertAndKey(const X509Certificate* cert); | 187 bool DeleteCertAndKey(const X509Certificate* cert); |
(...skipping 16 matching lines...) Expand all Loading... |
201 static void NotifyObserversOfUserCertAdded(const X509Certificate* cert); | 204 static void NotifyObserversOfUserCertAdded(const X509Certificate* cert); |
202 static void NotifyObserversOfUserCertRemoved(const X509Certificate* cert); | 205 static void NotifyObserversOfUserCertRemoved(const X509Certificate* cert); |
203 static void NotifyObserversOfCertTrustChanged(const X509Certificate* cert); | 206 static void NotifyObserversOfCertTrustChanged(const X509Certificate* cert); |
204 | 207 |
205 DISALLOW_COPY_AND_ASSIGN(CertDatabase); | 208 DISALLOW_COPY_AND_ASSIGN(CertDatabase); |
206 }; | 209 }; |
207 | 210 |
208 } // namespace net | 211 } // namespace net |
209 | 212 |
210 #endif // NET_BASE_CERT_DATABASE_H_ | 213 #endif // NET_BASE_CERT_DATABASE_H_ |
OLD | NEW |