OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
152 // |not_imported|. | 152 // |not_imported|. |
153 // Returns false if there is an internal error, otherwise true is returned and | 153 // Returns false if there is an internal error, otherwise true is returned and |
154 // |not_imported| should be checked for any certificates that were not | 154 // |not_imported| should be checked for any certificates that were not |
155 // imported. | 155 // imported. |
156 bool ImportServerCert(const CertificateList& certificates, | 156 bool ImportServerCert(const CertificateList& certificates, |
157 ImportCertFailureList* not_imported); | 157 ImportCertFailureList* not_imported); |
158 | 158 |
159 // Get trust bits for certificate. | 159 // Get trust bits for certificate. |
160 unsigned int GetCertTrust(const X509Certificate* cert, CertType type) const; | 160 unsigned int GetCertTrust(const X509Certificate* cert, CertType type) const; |
161 | 161 |
162 // IsUntrusted returns true if |cert| is specifically untrusted. These | |
163 // certificates are remembered for the specific purpose of rejecting them. | |
wtc
2011/09/21 17:05:33
Nit: remembered => stored in the database ?
agl
2011/09/21 17:53:53
Done.
| |
164 bool IsUntrusted(const X509Certificate* cert) const; | |
165 | |
162 // Set trust values for certificate. | 166 // Set trust values for certificate. |
163 // Returns true on success or false on failure. | 167 // Returns true on success or false on failure. |
164 bool SetCertTrust(const X509Certificate* cert, | 168 bool SetCertTrust(const X509Certificate* cert, |
165 CertType type, | 169 CertType type, |
166 unsigned int trust_bits); | 170 unsigned int trust_bits); |
167 | 171 |
168 // Delete certificate and associated private key (if one exists). | 172 // Delete certificate and associated private key (if one exists). |
169 // Returns true on success or false on failure. | 173 // Returns true on success or false on failure. |
170 // |cert| is still valid when this function returns. | 174 // |cert| is still valid when this function returns. |
171 bool DeleteCertAndKey(const X509Certificate* cert); | 175 bool DeleteCertAndKey(const X509Certificate* cert); |
(...skipping 15 matching lines...) Expand all Loading... | |
187 // Broadcasts notifications to all registered observers. | 191 // Broadcasts notifications to all registered observers. |
188 static void NotifyObserversOfUserCertAdded(const X509Certificate* cert); | 192 static void NotifyObserversOfUserCertAdded(const X509Certificate* cert); |
189 static void NotifyObserversOfCertTrustChanged(const X509Certificate* cert); | 193 static void NotifyObserversOfCertTrustChanged(const X509Certificate* cert); |
190 | 194 |
191 DISALLOW_COPY_AND_ASSIGN(CertDatabase); | 195 DISALLOW_COPY_AND_ASSIGN(CertDatabase); |
192 }; | 196 }; |
193 | 197 |
194 } // namespace net | 198 } // namespace net |
195 | 199 |
196 #endif // NET_BASE_CERT_DATABASE_H_ | 200 #endif // NET_BASE_CERT_DATABASE_H_ |
OLD | NEW |