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

Unified Diff: main.cc

Issue 6821025: entd: move opencryptoki initialization out of entd (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/entd.git@master
Patch Set: switch to using a flag to expect cryptohome to init pkcs11 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 | « bin/entdwife.sh ('k') | reference_extension/client.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: main.cc
diff --git a/main.cc b/main.cc
index 14c70a91abd62af90884faac1be9833cefca73ef..9e734bfbd15b000aa0e488004403b609533ac36a 100644
--- a/main.cc
+++ b/main.cc
@@ -15,6 +15,7 @@
#include "entd/callback_server.h"
#include "entd/http.h"
#include "entd/pkcs11.h"
+#include "entd/tpm.h"
#include "entd/utils.h"
namespace switches {
@@ -56,6 +57,10 @@ static const char *kLibcrosLocation = "libcros-location";
static const char *kCallbackOrigin = "callback-origin";
+// TODO(crosbug.com/14277): Remove option and assume it is true.
+static const char *kCryptohomeInitPkcs11 =
+ "cryptohome-init-pkcs11";
+
} // namespace switches
// Return values:
@@ -137,6 +142,11 @@ int main(int argc, char** argv) {
LOG(INFO) << "Setting libcros location: " << entd::Entd::libcros_location;
}
+ if (cl->HasSwitch(switches::kCryptohomeInitPkcs11)) {
+ LOG(INFO) << "Expecting cryptohome to initialize the TPM token";
+ entd::Tpm::cryptohome_init_pkcs11 = true;
+ }
+
if (cl->HasSwitch(switches::kAllowFileIO)) {
LOG(INFO) << "Allowing File IO.";
entd::Entd::allow_file_io = true;
« no previous file with comments | « bin/entdwife.sh ('k') | reference_extension/client.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698