aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/eltan/security/mboot
diff options
context:
space:
mode:
authorWim Vervoorn <wvervoorn@eltan.com>2020-01-27 15:47:44 +0100
committerPatrick Georgi <pgeorgi@google.com>2020-02-05 09:31:42 +0000
commit821004776ffbf2a7d0bc321bdf094cff13dfcc09 (patch)
treecf6eae2211d599533a35147a713a446b6d4b8bd8 /src/vendorcode/eltan/security/mboot
parent7a4983d1d2731cf3ea82016b6b8009668c1fc3f2 (diff)
vendorcode/eltan/security: Switch to vb2 vboot library
The eltan verified_boot is using the vboot 2.1 data structures and code, as well as the fwlib21 build target, they are all deprecated. Refer to CB:37654 for more information. The verified_boot code is updated to use the vb2 structures and code and make sure only public functions are used. BUG=N/A TEST=build Change-Id: I1e1a7bce6110fe35221a4d7a47c1eb7c7074c318 Signed-off-by: Wim Vervoorn <wvervoorn@eltan.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38590 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Diffstat (limited to 'src/vendorcode/eltan/security/mboot')
-rw-r--r--src/vendorcode/eltan/security/mboot/Kconfig1
-rw-r--r--src/vendorcode/eltan/security/mboot/mboot.c4
-rw-r--r--src/vendorcode/eltan/security/mboot/mboot.h1
3 files changed, 3 insertions, 3 deletions
diff --git a/src/vendorcode/eltan/security/mboot/Kconfig b/src/vendorcode/eltan/security/mboot/Kconfig
index c4e8dbabee..b95c125578 100644
--- a/src/vendorcode/eltan/security/mboot/Kconfig
+++ b/src/vendorcode/eltan/security/mboot/Kconfig
@@ -17,6 +17,7 @@ menu "Measured Boot (mboot)"
config VENDORCODE_ELTAN_MBOOT
bool "Measure firmware with mboot."
default n
+ select VBOOT_LIB
help
Enabling MBOOT will use mboot to measure the components of the firmware
(stages, payload, etc).
diff --git a/src/vendorcode/eltan/security/mboot/mboot.c b/src/vendorcode/eltan/security/mboot/mboot.c
index c5523a5fd8..4429c1f5a0 100644
--- a/src/vendorcode/eltan/security/mboot/mboot.c
+++ b/src/vendorcode/eltan/security/mboot/mboot.c
@@ -142,8 +142,8 @@ int mboot_hash_extend_log(uint64_t flags, uint8_t *hashData, uint32_t hashDataLe
/* The hash is provided as data */
memcpy(digest->digest.sha256, (void *)hashData, hashDataLen);
} else {
- if (cb_sha_little_endian(VB2_HASH_SHA256, hashData, hashDataLen,
- digest->digest.sha256))
+ if (vb2_digest_buffer(hashData, hashDataLen, VB2_HASH_SHA256, digest->digest.sha256,
+ VB2_SHA256_DIGEST_SIZE))
return TPM_E_IOERROR;
}
diff --git a/src/vendorcode/eltan/security/mboot/mboot.h b/src/vendorcode/eltan/security/mboot/mboot.h
index 79f23087c2..9cb94b11df 100644
--- a/src/vendorcode/eltan/security/mboot/mboot.h
+++ b/src/vendorcode/eltan/security/mboot/mboot.h
@@ -20,7 +20,6 @@
#include <arch/io.h>
#include <arch/acpi.h>
#include <string.h>
-#include <cb_sha.h>
#include <console/console.h>
#include <cbfs.h>
#include <lib.h>