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

Unified Diff: chrome/browser/chromeos/options/cert_library.cc

Issue 135193007: Use user specific NSSDatabase in CertLoader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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/chromeos/options/cert_library.cc
diff --git a/chrome/browser/chromeos/options/cert_library.cc b/chrome/browser/chromeos/options/cert_library.cc
index 8c9ac18a9561b38ad70d9c12b469ea89ed4090f0..d90518670e527252d4b810e19ad94967693062fd 100644
--- a/chrome/browser/chromeos/options/cert_library.cc
+++ b/chrome/browser/chromeos/options/cert_library.cc
@@ -36,7 +36,8 @@ namespace {
// Root CA certificates that are built into Chrome use this token name.
const char kRootCertificateTokenName[] = "Builtin Object Token";
-base::string16 GetDisplayString(net::X509Certificate* cert, bool hardware_backed) {
+base::string16 GetDisplayString(net::X509Certificate* cert,
+ bool hardware_backed) {
std::string org;
if (!cert->subject().organization_names.empty())
org = cert->subject().organization_names[0];
@@ -170,13 +171,8 @@ std::string CertLibrary::GetCertPkcs11IdAt(CertType type, int index) const {
}
bool CertLibrary::IsCertHardwareBackedAt(CertType type, int index) const {
- if (!CertLoader::Get()->IsHardwareBacked())
- return false;
net::X509Certificate* cert = GetCertificateAt(type, index);
- std::string cert_token_name =
- x509_certificate_model::GetTokenName(cert->os_cert_handle());
- return cert_token_name ==
- CertLoader::Get()->tpm_token_name();
+ return CertLoader::Get()->IsCertificateHardwareBacked(cert);
}
int CertLibrary::GetCertIndexByPEM(CertType type,
« no previous file with comments | « chrome/browser/chromeos/login/test_login_utils.cc ('k') | chrome/browser/chromeos/settings/device_settings_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698