From f8c65491595a8e849cf61b600b2371357ec75ff4 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Mon, 27 Jun 2011 13:57:28 -0700 Subject: Verified boot wrapper - replace utility functions This is part 3 of the vboot wrapper API refactoring. It replaces the function calls to utility.c functions with new API calls. (It also fixes up some integer type mismatches in cryptolib that were causing warnings on the H2C build; those had been fixed a while ago in H2C but hadn't been propagated across.) This is a re-commit of the original; I've verified it compiles on both x86-alex and tegra2, for both vboot_reference and vboot_reference-firmware, now that the patch from 1c1a883bc746a6216bb634825d33d80562853020 is checked in. BUG=chromium-os:17006 TEST=make && make runtests, and emerged on both x86-alex and tegra2 Original-Change-Id: I771085dcdf79d9592de64f35e3b758111a80dd9f Original-Reviewed-on: http://gerrit.chromium.org/gerrit/3263 Original-Reviewed-by: Simon Glass Tested-by: Randall Spangler (cherry picked from commit bd81b3a7d3b7fe4ca6179ade665e565800ab17fc) Change-Id: Iefdbfb3d10eb9aa385fb6dfc3bf0896f637cb64b Reviewed-on: http://gerrit.chromium.org/gerrit/3582 Reviewed-by: Bill Richardson Tested-by: Randall Spangler --- firmware/lib/vboot_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'firmware/lib/vboot_common.c') diff --git a/firmware/lib/vboot_common.c b/firmware/lib/vboot_common.c index a20e16fb..81e2597b 100644 --- a/firmware/lib/vboot_common.c +++ b/firmware/lib/vboot_common.c @@ -7,6 +7,7 @@ */ +#include "vboot_api.h" #include "vboot_common.h" #include "utility.h" @@ -231,7 +232,7 @@ int KeyBlockVerify(const VbKeyBlockHeader* block, uint64_t size, SHA512_DIGEST_ALGORITHM); rv = SafeMemcmp(header_checksum, GetSignatureDataC(sig), SHA512_DIGEST_SIZE); - Free(header_checksum); + VbExFree(header_checksum); if (rv) { VBDEBUG(("Invalid key block hash.\n")); return VBOOT_KEY_BLOCK_HASH; -- cgit v1.2.1