Added proper support for delayed TPM SRK availability.

If a TPM has not been owned it does not have an SRK and cannot be used
by Chaps.  If chapsd starts before TPM ownership occurs it will now wait
and finish initialization tasks until after the TPM is owned.  Until the
TPM is owned all LoadToken calls will fail.

If no TPM is available on the system, chapsd will warn and continue to
serve dbus calls but fail any attempts to load a token.

BUG=chromium:210525
TEST=unit, manual

Change-Id: I9b9d177f3b43b4ae5dd11c1ebf83daa5c21971c8
Reviewed-on: https://chromium-review.googlesource.com/183851
Reviewed-by: Darren Krahn <dkrahn@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
Commit-Queue: Darren Krahn <dkrahn@chromium.org>
8 files changed
tree: 0675b9bf14f400b121e748f90842f56fd5a99bf0
  1. LICENSE
  2. Makefile
  3. OWNERS
  4. README
  5. attributes.cc
  6. attributes.h
  7. attributes.proto
  8. chaps.cc
  9. chaps.gyp
  10. chaps.h
  11. chaps_adaptor.cc
  12. chaps_adaptor.h
  13. chaps_client.cc
  14. chaps_factory.h
  15. chaps_factory_impl.cc
  16. chaps_factory_impl.h
  17. chaps_factory_mock.cc
  18. chaps_factory_mock.h
  19. chaps_interface.h
  20. chaps_interface.xml
  21. chaps_pam_module.cc
  22. chaps_pam_module_test.cc
  23. chaps_proxy.cc
  24. chaps_proxy.h
  25. chaps_proxy_mock.h
  26. chaps_service.cc
  27. chaps_service.h
  28. chaps_service_redirect.cc
  29. chaps_service_redirect.h
  30. chaps_service_test.cc
  31. chaps_test.cc
  32. chaps_utility.cc
  33. chaps_utility.h
  34. chapsd.cc
  35. chapsd.conf
  36. chapsd_test.cc
  37. common.mk
  38. handle_generator.h
  39. handle_generator_mock.h
  40. isolate.h
  41. isolate_chromeos.cc
  42. isolate_linux.cc
  43. isolate_login_client.cc
  44. isolate_login_client.h
  45. isolate_login_client_mock.h
  46. isolate_login_client_test.cc
  47. isolate_mock.h
  48. object.h
  49. object_impl.cc
  50. object_impl.h
  51. object_importer.h
  52. object_importer_mock.cc
  53. object_importer_mock.h
  54. object_mock.cc
  55. object_mock.h
  56. object_policy.h
  57. object_policy_cert.cc
  58. object_policy_cert.h
  59. object_policy_common.cc
  60. object_policy_common.h
  61. object_policy_data.cc
  62. object_policy_data.h
  63. object_policy_key.cc
  64. object_policy_key.h
  65. object_policy_mock.cc
  66. object_policy_mock.h
  67. object_policy_private_key.cc
  68. object_policy_private_key.h
  69. object_policy_public_key.cc
  70. object_policy_public_key.h
  71. object_policy_secret_key.cc
  72. object_policy_secret_key.h
  73. object_policy_test.cc
  74. object_pool.h
  75. object_pool_impl.cc
  76. object_pool_impl.h
  77. object_pool_mock.cc
  78. object_pool_mock.h
  79. object_pool_test.cc
  80. object_store.h
  81. object_store_fake.h
  82. object_store_impl.cc
  83. object_store_impl.h
  84. object_store_mock.cc
  85. object_store_mock.h
  86. object_store_test.cc
  87. object_test.cc
  88. opencryptoki_importer.cc
  89. opencryptoki_importer.h
  90. opencryptoki_importer_test.cc
  91. opencryptoki_sample_token.tgz
  92. org.chromium.Chaps.conf.in
  93. p11_replay.cc
  94. pam_chaps.cfg
  95. pam_helper.cc
  96. pam_helper.h
  97. pam_helper_mock.cc
  98. pam_helper_mock.h
  99. pkcs11/
  100. platform_globals.h
  101. platform_globals_chromeos.cc
  102. platform_globals_linux.cc
  103. session.h
  104. session_impl.cc
  105. session_impl.h
  106. session_mock.cc
  107. session_mock.h
  108. session_test.cc
  109. slot_manager.h
  110. slot_manager_impl.cc
  111. slot_manager_impl.h
  112. slot_manager_mock.cc
  113. slot_manager_mock.h
  114. slot_manager_test.cc
  115. token_file_manager.h
  116. token_file_manager_chromeos.cc
  117. token_file_manager_linux.cc
  118. token_file_manager_mock.h
  119. token_manager_client.cc
  120. token_manager_client.h
  121. token_manager_client_mock.h
  122. token_manager_interface.h
  123. tpm_utility.h
  124. tpm_utility_impl.cc
  125. tpm_utility_impl.h
  126. tpm_utility_mock.cc
  127. tpm_utility_mock.h
  128. tpm_utility_test.cc