forked from pool/grub2
16 lines
719 B
Diff
16 lines
719 B
Diff
|
Index: grub-2.06/grub-core/tpm2/module.c
|
||
|
===================================================================
|
||
|
--- grub-2.06.orig/grub-core/tpm2/module.c
|
||
|
+++ grub-2.06/grub-core/tpm2/module.c
|
||
|
@@ -139,7 +139,9 @@ grub_tpm2_protector_srk_read_keyfile (co
|
||
|
void *sealed_key_buffer;
|
||
|
grub_off_t sealed_key_read;
|
||
|
|
||
|
- sealed_key_file = grub_file_open (filepath, GRUB_FILE_TYPE_NONE);
|
||
|
+ /* Using GRUB_FILE_TYPE_SIGNATURE ensures we do not hash the keyfile into PCR9
|
||
|
+ * otherwise we'll never be able to predict the value of PCR9 at unseal time */
|
||
|
+ sealed_key_file = grub_file_open (filepath, GRUB_FILE_TYPE_SIGNATURE);
|
||
|
if (!sealed_key_file)
|
||
|
{
|
||
|
grub_dprintf ("tpm2", "Could not open sealed key file.\n");
|