This got missed for the current version, so I'm resubmitting for the next version:

# HG changeset patch
# User Christopher Byrne <salah.coro...@gmail.com>
# Date 1672084560 21600
#      Mon Dec 26 13:56:00 2022 -0600
# Node ID de13f5fe8812350a662e411d5253067a2bb3e3b6
# Parent  4a904a608c70468d3156341dd9132233c4c4ff5b
lcptools-v2/pconf_legacy.c: Add missing BE size_of_pcrs to hash buffer

First fix attempt was almost correct. System still doesn't boot with PCONF element. I forgot 1 important line though. Once added, the system now boots with the PCONF element. Tested with both 1 PCR and 2 PCRs.

Signed-of-by: Christopher Byrne <salah.coro...@gmail.com>

diff -r 4a904a608c70 -r de13f5fe8812 lcptools-v2/pconf_legacy.c
--- a/lcptools-v2/pconf_legacy.c        Fri Dec 23 10:15:47 2022 +0100
+++ b/lcptools-v2/pconf_legacy.c        Mon Dec 26 13:56:00 2022 -0600
@@ -241,6 +241,7 @@
         ERROR("Error: failed to allocate buffer for composite digest.\n");
         return false;
     }
+    buff->size_of_pcrs = htonl(no_of_pcrs * SHA1_DIGEST_SIZE);
     memcpy_s(
         &buff->pcr_selection,
         sizeof buff->pcr_selection,


_______________________________________________
tboot-devel mailing list
tboot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tboot-devel

Reply via email to