Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1093)

Side by Side Diff: net/base/cert_database.h

Issue 7272014: Mark untrusted certificates as such in Linux UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // |not_imported|. 155 // |not_imported|.
156 // Returns false if there is an internal error, otherwise true is returned and 156 // Returns false if there is an internal error, otherwise true is returned and
157 // |not_imported| should be checked for any certificates that were not 157 // |not_imported| should be checked for any certificates that were not
158 // imported. 158 // imported.
159 bool ImportServerCert(const CertificateList& certificates, 159 bool ImportServerCert(const CertificateList& certificates,
160 ImportCertFailureList* not_imported); 160 ImportCertFailureList* not_imported);
161 161
162 // Get trust bits for certificate. 162 // Get trust bits for certificate.
163 TrustBits GetCertTrust(const X509Certificate* cert, CertType type) const; 163 TrustBits GetCertTrust(const X509Certificate* cert, CertType type) const;
164 164
165 // IsUntrusted returns true if |cert| is specifically untrusted. These
166 // certificates are stored in the database for the specific purpose of
167 // rejecting them.
168 bool IsUntrusted(const X509Certificate* cert) const;
169
165 // Set trust values for certificate. 170 // Set trust values for certificate.
166 // Returns true on success or false on failure. 171 // Returns true on success or false on failure.
167 bool SetCertTrust(const X509Certificate* cert, 172 bool SetCertTrust(const X509Certificate* cert,
168 CertType type, 173 CertType type,
169 TrustBits trust_bits); 174 TrustBits trust_bits);
170 175
171 // Delete certificate and associated private key (if one exists). 176 // Delete certificate and associated private key (if one exists).
172 // Returns true on success or false on failure. 177 // Returns true on success or false on failure.
173 // |cert| is still valid when this function returns. 178 // |cert| is still valid when this function returns.
174 bool DeleteCertAndKey(const X509Certificate* cert); 179 bool DeleteCertAndKey(const X509Certificate* cert);
(...skipping 15 matching lines...) Expand all
190 // Broadcasts notifications to all registered observers. 195 // Broadcasts notifications to all registered observers.
191 static void NotifyObserversOfUserCertAdded(const X509Certificate* cert); 196 static void NotifyObserversOfUserCertAdded(const X509Certificate* cert);
192 static void NotifyObserversOfCertTrustChanged(const X509Certificate* cert); 197 static void NotifyObserversOfCertTrustChanged(const X509Certificate* cert);
193 198
194 DISALLOW_COPY_AND_ASSIGN(CertDatabase); 199 DISALLOW_COPY_AND_ASSIGN(CertDatabase);
195 }; 200 };
196 201
197 } // namespace net 202 } // namespace net
198 203
199 #endif // NET_BASE_CERT_DATABASE_H_ 204 #endif // NET_BASE_CERT_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698