tpm2: change tpm2_unseal() to accept Tpm2Context instead of device string

This matches the change to tpm2_seal(), which now accepts a Tpm2Context instead
of a device string.

This also allows using the same TPM context for sealing and unsealing, which
will be required by (future) test code when sealing/unsealing using a transient
key.
This commit is contained in:
Dan Streetman
2023-10-03 12:56:55 -04:00
parent 7014006906
commit db7fdf152b
6 changed files with 22 additions and 16 deletions
+1 -1
View File
@@ -279,7 +279,7 @@ int enroll_tpm2(struct crypt_device *cd,
size_t secret2_size;
log_debug("Unsealing for verification...");
r = tpm2_unseal(device,
r = tpm2_unseal(tpm2_context,
hash_pcr_mask,
hash_pcr_bank,
pubkey, pubkey_size,