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; |