cryptenroll: hook up new TPM2 signed policies with cryptenroll

This commit is contained in:
Lennart Poettering
2022-09-08 16:34:27 +02:00
parent 75ddec9301
commit f0f4fcaeb7
7 changed files with 201 additions and 58 deletions
+11 -1
View File
@@ -2950,7 +2950,17 @@ static int partition_encrypt(
if (keyslot < 0)
return log_error_errno(keyslot, "Failed to add new TPM2 key to %s: %m", node);
r = tpm2_make_luks2_json(keyslot, arg_tpm2_pcr_mask, pcr_bank, primary_alg, blob, blob_size, hash, hash_size, 0, &v);
r = tpm2_make_luks2_json(
keyslot,
arg_tpm2_pcr_mask,
pcr_bank,
/* pubkey= */ NULL, /* pubkey_size= */ 0,
/* pubkey_pcr_mask= */ 0,
primary_alg,
blob, blob_size,
hash, hash_size,
0,
&v);
if (r < 0)
return log_error_errno(r, "Failed to prepare TPM2 JSON token object: %m");