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

Unified Diff: chrome/browser/certificate_manager_model.h

Issue 9940001: Fix imported server certs being distrusted in NSS 3.13. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review changes Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/certificate_manager_model.h
diff --git a/chrome/browser/certificate_manager_model.h b/chrome/browser/certificate_manager_model.h
index a82409483dcc1b2cee818ec32f68ece448cc07a7..8078e866a13fe6ecd169798580aad910805dbbb4 100644
--- a/chrome/browser/certificate_manager_model.h
+++ b/chrome/browser/certificate_manager_model.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -67,8 +67,7 @@ class CertificateManagerModel {
// Tries to import all the certificates given. The root will be trusted
// according to |trust_bits|. Any certificates that could not be imported
// will be listed in |not_imported|.
- // |trust_bits| should be a bit field of TRUST_* values from CertDatabase, or
- // UNTRUSTED.
+ // |trust_bits| should be a bit field of TRUST* values from CertDatabase.
// Returns false if there is an internal error, otherwise true is returned and
// |not_imported| should be checked for any certificates that were not
// imported.
@@ -81,16 +80,18 @@ class CertificateManagerModel {
// not given any trust.
// Any certificates that could not be imported will be listed in
// |not_imported|.
+ // |trust_bits| can be set to explicitly trust or distrust the certificate, or
+ // use TRUST_DEFAULT to inherit trust as normal.
// Returns false if there is an internal error, otherwise true is returned and
// |not_imported| should be checked for any certificates that were not
// imported.
bool ImportServerCert(
const net::CertificateList& certificates,
+ net::CertDatabase::TrustBits trust_bits,
net::CertDatabase::ImportCertFailureList* not_imported);
// Set trust values for certificate.
- // |trust_bits| should be a bit field of TRUST_* values from CertDatabase, or
- // UNTRUSTED.
+ // |trust_bits| should be a bit field of TRUST* values from CertDatabase.
// Returns true on success or false on failure.
bool SetCertTrust(const net::X509Certificate* cert,
net::CertType type,
« no previous file with comments | « no previous file | chrome/browser/certificate_manager_model.cc » ('j') | chrome/browser/chromeos/cros/onc_network_parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698