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. pkcs11/
  2. attributes.cc
  3. attributes.h
  4. attributes.proto
  5. chaps.cc
  6. chaps.gyp
  7. chaps.h
  8. chaps_adaptor.cc
  9. chaps_adaptor.h
  10. chaps_client.cc
  11. chaps_factory.h
  12. chaps_factory_impl.cc
  13. chaps_factory_impl.h
  14. chaps_factory_mock.cc
  15. chaps_factory_mock.h
  16. chaps_interface.h
  17. chaps_interface.xml
  18. chaps_pam_module.cc
  19. chaps_pam_module_test.cc
  20. chaps_proxy.cc
  21. chaps_proxy.h
  22. chaps_proxy_mock.h
  23. chaps_service.cc
  24. chaps_service.h
  25. chaps_service_redirect.cc
  26. chaps_service_redirect.h
  27. chaps_service_test.cc
  28. chaps_test.cc
  29. chaps_utility.cc
  30. chaps_utility.h
  31. chapsd.cc
  32. chapsd.conf
  33. chapsd_test.cc
  34. common.mk
  35. handle_generator.h
  36. handle_generator_mock.h
  37. isolate.h
  38. isolate_chromeos.cc
  39. isolate_linux.cc
  40. isolate_login_client.cc
  41. isolate_login_client.h
  42. isolate_login_client_mock.h
  43. isolate_login_client_test.cc
  44. isolate_mock.h
  45. LICENSE
  46. Makefile
  47. object.h
  48. object_impl.cc
  49. object_impl.h
  50. object_importer.h
  51. object_importer_mock.cc
  52. object_importer_mock.h
  53. object_mock.cc
  54. object_mock.h
  55. object_policy.h
  56. object_policy_cert.cc
  57. object_policy_cert.h
  58. object_policy_common.cc
  59. object_policy_common.h
  60. object_policy_data.cc
  61. object_policy_data.h
  62. object_policy_key.cc
  63. object_policy_key.h
  64. object_policy_mock.cc
  65. object_policy_mock.h
  66. object_policy_private_key.cc
  67. object_policy_private_key.h
  68. object_policy_public_key.cc
  69. object_policy_public_key.h
  70. object_policy_secret_key.cc
  71. object_policy_secret_key.h
  72. object_policy_test.cc
  73. object_pool.h
  74. object_pool_impl.cc
  75. object_pool_impl.h
  76. object_pool_mock.cc
  77. object_pool_mock.h
  78. object_pool_test.cc
  79. object_store.h
  80. object_store_fake.h
  81. object_store_impl.cc
  82. object_store_impl.h
  83. object_store_mock.cc
  84. object_store_mock.h
  85. object_store_test.cc
  86. object_test.cc
  87. opencryptoki_importer.cc
  88. opencryptoki_importer.h
  89. opencryptoki_importer_test.cc
  90. opencryptoki_sample_token.tgz
  91. org.chromium.Chaps.conf.in
  92. OWNERS
  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. platform_globals.h
  100. platform_globals_chromeos.cc
  101. platform_globals_linux.cc
  102. README
  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