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.

# HG changeset patch
# User Christopher Byrne <salah.coro...@gmail.com>
# Date 1645847383 21600
#      Fri Feb 25 21:49:43 2022 -0600
# Node ID ada51f373f12ee91feb2526220b6a94db92319ac
# Parent  6e831184f480ed34154e12eddc2d037d6a417a5f
lcptools-v2/pconf_legacy.c: Add missing BE size_of_pcrs to hash buffer

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

diff --git a/lcptools-v2/pconf_legacy.c b/lcptools-v2/pconf_legacy.c
--- a/lcptools-v2/pconf_legacy.c
+++ b/lcptools-v2/pconf_legacy.c
@@ -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