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

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

Issue 421113002: Use correct slot id for client certs in network config. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 5 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
« no previous file with comments | « chrome/browser/chromeos/options/cert_library.h ('k') | chrome/browser/chromeos/options/vpn_config_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8c2c805656c4cc7b79ea10c0bb5b64312727eb13..91b42aa64606475dfd659019cbb12fcc1f3b4ed6 100644
--- a/chrome/browser/chromeos/options/cert_library.cc
+++ b/chrome/browser/chromeos/options/cert_library.cc
@@ -149,10 +149,6 @@ bool CertLibrary::IsHardwareBacked() const {
return CertLoader::Get()->IsHardwareBacked();
}
-std::string CertLibrary::GetTPMSlotID() const {
- return base::IntToString(CertLoader::Get()->TPMTokenSlotID());
-}
-
int CertLibrary::NumCertificates(CertType type) const {
const net::CertificateList& cert_list = GetCertificateListForType(type);
return static_cast<int>(cert_list.size());
@@ -169,9 +165,9 @@ std::string CertLibrary::GetServerCACertPEMAt(int index) const {
return CertToPEM(*GetCertificateAt(CERT_TYPE_SERVER_CA, index));
}
-std::string CertLibrary::GetUserCertPkcs11IdAt(int index) const {
+std::string CertLibrary::GetUserCertPkcs11IdAt(int index, int* slot_id) const {
net::X509Certificate* cert = GetCertificateAt(CERT_TYPE_USER, index);
- return CertLoader::GetPkcs11IdForCert(*cert);
+ return CertLoader::GetPkcs11IdAndSlotForCert(*cert, slot_id);
}
bool CertLibrary::IsCertHardwareBackedAt(CertType type, int index) const {
@@ -196,7 +192,8 @@ int CertLibrary::GetUserCertIndexByPkcs11Id(
int num_certs = NumCertificates(CERT_TYPE_USER);
for (int index = 0; index < num_certs; ++index) {
net::X509Certificate* cert = GetCertificateAt(CERT_TYPE_USER, index);
- std::string id = CertLoader::GetPkcs11IdForCert(*cert);
+ int slot_id = -1;
+ std::string id = CertLoader::GetPkcs11IdAndSlotForCert(*cert, &slot_id);
if (id == pkcs11_id)
return index;
}
« no previous file with comments | « chrome/browser/chromeos/options/cert_library.h ('k') | chrome/browser/chromeos/options/vpn_config_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698