Mike Gerow 68deb4ce55 Use NV cert index as auth hierarchy for EK cert
This is the same approach tpm2_getekcertificate uses, with its
`TPM2_HANDLE_FLAGS_NV` flag.

The main impetus here is is ChromeOS's vtpm implementation[1], which
doesn't have a concept of an "owner" or "platform" password and expects
the NV index itself as the auth hierarchy. In either case, as this is
the same approach tpm2_getekcertificate uses this should provide a more
standard/common approach as opposed to relying on the owner password to
be empty.

Tested with both CrOS's vTPM and a real TPM on Debian.

b/258300352

[1]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform2/vtpm/commands/nv_read_command.cc;l=64-68;drc=1efd0c8f36050d56b8550354a4c7af925e44118a
2023-01-05 12:25:14 -08:00
..
2022-11-01 13:38:49 -07:00
2022-11-01 13:38:49 -07:00
2019-10-09 08:56:19 +11:00
2022-11-01 12:19:57 -07:00
2022-02-14 16:31:48 -08:00
2019-10-09 08:56:19 +11:00
2022-11-01 13:38:49 -07:00
2022-11-01 13:38:49 -07:00
2021-09-01 15:39:03 -07:00
2022-11-01 12:19:57 -07:00
2022-11-01 12:19:57 -07:00
2022-11-01 13:38:49 -07:00
2022-11-01 13:38:49 -07:00
2022-11-01 13:38:49 -07:00
2022-11-01 12:19:57 -07:00
2019-08-06 16:47:13 -07:00
2022-11-01 13:38:49 -07:00
2022-11-01 13:38:49 -07:00