diff options
author | Sergii Dmytruk <sergii.dmytruk@3mdeb.com> | 2022-10-22 20:11:35 +0300 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2022-11-12 23:16:07 +0000 |
commit | 7221a6cfc5ccc45b188d36815d2b011142f2cf12 (patch) | |
tree | 2811c8ef5a5e1f4777471b6e223009c31f8eba63 /src/vendorcode | |
parent | 3ff77016da988d37ba0dbe44538c10f92b2704c5 (diff) |
security/tpm: improve tlcl_extend() signature
Until now tcg-2.0/tss.c was just assuming certain buffer size and
hash algorithm. Change it to accept digest type, which the call sites
know.
Also drop `uint8_t *out_digest` parameter which was always `NULL`
and was handled only by tcg-1.2 code.
Change-Id: I944302b502e3424c5041b17c713a867b0fc535c4
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68745
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Diffstat (limited to 'src/vendorcode')
-rw-r--r-- | src/vendorcode/eltan/security/mboot/mboot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vendorcode/eltan/security/mboot/mboot.c b/src/vendorcode/eltan/security/mboot/mboot.c index c26ac8f39d..d7817bdbe8 100644 --- a/src/vendorcode/eltan/security/mboot/mboot.c +++ b/src/vendorcode/eltan/security/mboot/mboot.c @@ -137,7 +137,8 @@ int mboot_hash_extend_log(uint64_t flags, uint8_t *hashData, uint32_t hashDataLe printk(BIOS_DEBUG, "%s: SHA256 Hash Digest:\n", __func__); mboot_print_buffer(digest->digest.sha256, VB2_SHA256_DIGEST_SIZE); - return (tlcl_extend(newEventHdr->pcrIndex, (uint8_t *)&(newEventHdr->digest), NULL)); + return (tlcl_extend(newEventHdr->pcrIndex, (uint8_t *)&(newEventHdr->digest), + VB2_HASH_SHA256)); } /* |