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

Unified Diff: chromeos/cert_loader.cc

Issue 26407002: Add support for the Pkcs11GetTpmTokenInfoForUser cryptohome call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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: chromeos/cert_loader.cc
diff --git a/chromeos/cert_loader.cc b/chromeos/cert_loader.cc
index ecae58ae8264779d5ee6ba7e965dc2e8aa89e8bc..567411732a0e85846f7a886914365dc2513ff2e9 100644
--- a/chromeos/cert_loader.cc
+++ b/chromeos/cert_loader.cc
@@ -297,7 +297,8 @@ void CertLoader::OnPkcs11IsTpmTokenReady(DBusMethodCallStatus call_status,
void CertLoader::OnPkcs11GetTpmTokenInfo(DBusMethodCallStatus call_status,
const std::string& token_name,
- const std::string& user_pin) {
+ const std::string& user_pin,
+ int token_slot) {
VLOG(1) << "OnPkcs11GetTpmTokenInfo: " << token_name;
if (call_status == DBUS_METHOD_CALL_FAILURE) {
@@ -306,10 +307,7 @@ void CertLoader::OnPkcs11GetTpmTokenInfo(DBusMethodCallStatus call_status,
}
tpm_token_name_ = token_name;
- // TODO(stevenjb): The network code expects a slot ID, not a label. See
- // crbug.com/201101. For now, use a hard coded, well known slot instead.
- const char kHardcodedTpmSlot[] = "0";
- tpm_token_slot_ = kHardcodedTpmSlot;
+ tpm_token_slot_ = base::IntToString(token_slot);
tpm_user_pin_ = user_pin;
tpm_token_state_ = TPM_TOKEN_INFO_RECEIVED;

Powered by Google App Engine
This is Rietveld 408576698