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

Unified Diff: service.cc

Issue 6823012: cryptohome: Add stub functions to query PKCS11 set up status (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cryptohome.git@master
Patch Set: word wrap Created 9 years, 8 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 | « service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service.cc
diff --git a/service.cc b/service.cc
index ed47224568e5c6a38f6111187bcefbf06fd759ed..b2551862849d5c037d6583b97d3ff42cf675c327 100644
--- a/service.cc
+++ b/service.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -81,6 +81,8 @@ Service::Service()
mount_(default_mount_.get()),
default_tpm_init_(new TpmInit()),
tpm_init_(default_tpm_init_.get()),
+ default_pkcs11_init_(new Pkcs11Init()),
+ pkcs11_init_(default_pkcs11_init_.get()),
initialize_tpm_(true),
mount_thread_(kMountThreadName),
async_complete_signal_(-1),
@@ -567,6 +569,20 @@ gboolean Service::TpmClearStoredPassword(GError** error) {
return TRUE;
}
+gboolean Service::Pkcs11IsTpmTokenReady(gboolean* OUT_ready, GError** error) {
+ // TODO(kmixter/gauravsh): Base this on PKCS#11 really being initialized.
+ *OUT_ready = TRUE;
+ return TRUE;
+}
+
+gboolean Service::Pkcs11GetTpmTokenInfo(gchar** OUT_label,
+ gchar** OUT_user_pin,
+ GError** error) {
+ pkcs11_init_->GetTpmTokenInfo(OUT_label,
+ OUT_user_pin);
+ return TRUE;
+}
+
gboolean Service::GetStatusString(gchar** OUT_status, GError** error) {
Tpm::TpmStatusInfo tpm_status;
mount_->get_crypto()->EnsureTpm(false);
« no previous file with comments | « service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698